If you allocate memory with malloc() you should deallocate it with free(), strdup() allocates with malloc() so use free() to deallocate it :).
--HG-- branch : trunk
This commit is contained in:
@@ -254,7 +254,7 @@ void RASocket::zprint( const char * szText )
|
|||||||
unsigned int sz=strlen(megabuffer);
|
unsigned int sz=strlen(megabuffer);
|
||||||
Encrypt(megabuffer,sz);
|
Encrypt(megabuffer,sz);
|
||||||
send(r,megabuffer,sz,0);
|
send(r,megabuffer,sz,0);
|
||||||
delete [] megabuffer;
|
free(megabuffer);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user