summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-07 08:45:18 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-07 08:45:18 +0900
commitb97778a1c2246c1e0d3ed84d2d9b25c535b9f4d5 (patch)
treebe7b3ca9fe9f6a2aa8c82e5357c07a94b52bf5ce
parent6b20fcdc8fdd498956e61aa9534bccccb3480763 (diff)
ecore-con - url. fix curl init check to not access NULL _c context
this fixes T1738 (or should)
-rw-r--r--src/lib/ecore_con/ecore_con_url.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index c1cb63859b..2c5dc0ce5f 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -445,7 +445,11 @@ _ecore_con_url_eo_base_constructor(Ecore_Con_Url *url_obj, Ecore_Con_Url_Data *u
445 eo_do_super(url_obj, MY_CLASS, eo_constructor()); 445 eo_do_super(url_obj, MY_CLASS, eo_constructor());
446 446
447 if (!_init_count) eo_error_set(url_obj); 447 if (!_init_count) eo_error_set(url_obj);
448 if (!_c_init()) eo_error_set(url_obj); 448 if (!_c_init())
449 {
450 eo_error_set(url_obj);
451 return;
452 }
449 453
450 url_con->curl_easy = _c->curl_easy_init(); 454 url_con->curl_easy = _c->curl_easy_init();
451 if (!url_con->curl_easy) 455 if (!url_con->curl_easy)
@@ -606,7 +610,7 @@ _ecore_con_url_eo_base_destructor(Ecore_Con_Url *url_obj, Ecore_Con_Url_Data *ur
606 url_con->dead = EINA_TRUE; 610 url_con->dead = EINA_TRUE;
607 if (url_con->event_count) return; 611 if (url_con->event_count) return;
608 612
609 _c->curl_slist_free_all(url_con->headers); 613 if (_c) _c->curl_slist_free_all(url_con->headers);
610 EINA_LIST_FREE(url_con->additional_headers, s) 614 EINA_LIST_FREE(url_con->additional_headers, s)
611 free(s); 615 free(s);
612 EINA_LIST_FREE(url_con->response_headers, s) 616 EINA_LIST_FREE(url_con->response_headers, s)