fix incorrect realloc usage

SVN revision: 54073
This commit is contained in:
Mike Blumenkrantz 2010-11-01 07:10:07 +00:00
parent 4579813efe
commit 025cfe4c67
1 changed files with 5 additions and 1 deletions

View File

@ -2099,7 +2099,11 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl)
if (num > 0)
{
inbuf = realloc(inbuf, inbuf_num + num);
unsigned char *tmp;
if (!(tmp = realloc(inbuf, inbuf_num + num)))
/* FIXME: this should probably do something */
break;
inbuf = tmp;
memcpy(inbuf + inbuf_num, buf, num);
inbuf_num += num;
continue;