Commit 08bf4d68 authored by Hiroshi Inoue's avatar Hiroshi Inoue

Fix some memory leaks.

parent ebffbb42
......@@ -425,6 +425,7 @@ char rv = 1;
if (conns[lf] && conns[lf]->henv == self)
rv = rv && CC_Destructor(conns[lf]);
}
free(self);
mylog("exit EN_Destructor: rv = %d\n", rv);
return rv;
......
......@@ -58,11 +58,18 @@ SocketClass *rv;
rv->buffer_in = (unsigned char *) malloc(globals.socket_buffersize);
if ( ! rv->buffer_in)
{
free(rv);
return NULL;
}
rv->buffer_out = (unsigned char *) malloc(globals.socket_buffersize);
if ( ! rv->buffer_out)
{
free(rv->buffer_in);
free(rv);
return NULL;
}
rv->errormsg = NULL;
rv->errornumber = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment