only free when exists
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Nov 2010 11:24:29 +0000 (11:24 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Nov 2010 11:24:29 +0000 (11:24 +0000)
c/o vtorri

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@54075 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_con/ecore_con.c

index abc25ab..baefeea 100644 (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;