Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_con Modified Files: ecore_con_url.c Log Message: Free allocated memory on error. Set pointer to NULL after free. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con_url.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ecore_con_url.c 24 Jun 2005 14:26:01 -0000 1.2 +++ ecore_con_url.c 24 Jun 2005 14:31:51 -0000 1.3 @@ -144,7 +144,10 @@ url_con->curl_easy = curl_easy_init(); if (!url_con->curl_easy) - return NULL; + { + free(url_con); + return NULL; + } ecore_con_url_url_set(url_con, url); @@ -190,6 +193,7 @@ if (url_con->active) return 0; free(url_con->url); + url_con->url = NULL; if (url) url_con->url = strdup(url); curl_easy_setopt(url_con->curl_easy, CURLOPT_URL, url_con->url); ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs