malloc check

SVN revision: 54156
This commit is contained in:
Mike Blumenkrantz 2010-11-04 15:48:17 +00:00
parent 2b0ff1a99f
commit 6c1cd431a2
1 changed files with 6 additions and 0 deletions

View File

@ -1775,6 +1775,12 @@ _ecore_con_cl_read(Ecore_Con_Server *svr)
svr->event_count++;
e->server = svr;
e->data = malloc(num);
if (!e->data)
{
ERR("alloc!");
free(e);
return;
}
memcpy(e->data, buf, num);
e->size = num;
ecore_event_add(ECORE_CON_EVENT_SERVER_DATA, e,