eh I guess I'll clean up a little bit on failure too
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Nov 2010 07:11:25 +0000 (07:11 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Nov 2010 07:11:25 +0000 (07:11 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@54074 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index 21d3949..abc25ab 100644 (file)
@@ -2101,8 +2101,11 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl)
           {
              unsigned char *tmp;
              if (!(tmp = realloc(inbuf, inbuf_num + num)))
-               /* FIXME: this should probably do something */
-               break;
+               {
+                  /* FIXME: this should probably do something, but what? */
+                  free(inbuf);
+                  break;
+               }
              inbuf = tmp;
              memcpy(inbuf + inbuf_num, buf, num);
              inbuf_num += num;