malloc check
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 4 Nov 2010 15:48:17 +0000 (15:48 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 4 Nov 2010 15:48:17 +0000 (15:48 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@54156 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index ed98813..3f24ab5 100644 (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,