Fixed a memory leak when failing to create an AppClient

This commit is contained in:
Pierre Pronchery 2007-10-09 15:50:42 +00:00
parent d75dadcb7e
commit 69c1413a81

View File

@ -162,7 +162,7 @@ AppClient * appclient_new_event(char * app, Event * event)
appclient->buf_write_cnt = 0;
if(_new_connect(appclient, app) != 0)
{
free(appclient);
appclient_delete(appclient);
return NULL;
}
return appclient;