fixed memory leak

This commit is contained in:
orignal 2014-07-06 17:48:16 -04:00
parent 73ef5e29c2
commit 226ef77927
3 changed files with 12 additions and 5 deletions

View file

@ -1,4 +1,5 @@
#include <string.h>
#include <atomic>
#include "I2PEndian.h"
#include <cryptopp/sha.h>
#include <cryptopp/gzip.h>
@ -29,7 +30,7 @@ namespace i2p
delete msg;
}
static uint32_t I2NPmsgID = 0; // TODO: create class
static std::atomic<uint32_t> I2NPmsgID(0); // TODO: create class
void FillI2NPMessageHeader (I2NPMessage * msg, I2NPMessageType msgType, uint32_t replyMsgID)
{
I2NPHeader * header = msg->GetHeader ();