only free when exists

c/o vtorri


SVN revision: 54075
This commit is contained in:
Mike Blumenkrantz 2010-11-01 11:24:29 +00:00
parent 57cee09e0d
commit 01760826bb
1 changed files with 2 additions and 1 deletions

View File

@ -2103,7 +2103,8 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl)
if (!(tmp = realloc(inbuf, inbuf_num + num)))
{
/* FIXME: this should probably do something, but what? */
free(inbuf);
if (inbuf)
free(inbuf);
break;
}
inbuf = tmp;