On 11/11/2011 09:41 AM, Bluezery wrote:
> It's my mistake.
>
> fixed patch is attached again.
> I have removed active flag also.
> I use eina_list_data_find() instead.
+ EINA_LIST_FOREACH_SAFE(_url_con_list, l, ll, url_con)
+ {
+ CURLMcode ret;
+ Ecore_Con_Event_Url_Complete *e;
+ e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
+ if (e)
+ {
+ e->url_con = url_con;
+ e->status = 0;
+ _url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
+ }
+ ret = curl_multi_remove_handle(_curlm, url_con->curl_easy);
+ if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s",
curl_multi_strerror(ret));
+ _url_con_list = eina_list_remove(_url_con_list, url_con);
}
+ eina_list_free(_url_con_list);
+ _url_con_list = NULL;
Why do you use foreach safe, remove elements from list and then free
list? This is EINA_LIST_FREE.
Also, EINA_LIST_FREE sets list to NULL, no need to set to NULL afterwards.
Also no need to check list != NULL before EINA_LIST_FREE
S.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel