forked from enlightenment/efl
efl/cserve2: Fix invalid iteration over client references
The _request_failed() function is called by error responses from slaves, and iterating over references of a entry and removing each of them must be done with EINA_LIST_FOREACH_SAFE(), since _entry_free_cb() calls _entry_reference_del() which then removes the reference that is used in the next iteration in for-loop from _request_failed(). Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi> SVN revision: 81580
This commit is contained in:
parent
5973f890aa
commit
da061849b0
|
@ -388,12 +388,12 @@ _open_request_response(File_Data *e, Slave_Msg_Image_Opened *resp, int *size)
|
|||
static void
|
||||
_request_failed(Entry *e, Error_Type type EINA_UNUSED)
|
||||
{
|
||||
Eina_List *l;
|
||||
Eina_List *l, *l_next;
|
||||
Reference *ref;
|
||||
|
||||
e->request = NULL;
|
||||
|
||||
EINA_LIST_FOREACH(e->references, l, ref)
|
||||
EINA_LIST_FOREACH_SAFE(e->references, l, l_next, ref)
|
||||
{
|
||||
Eina_Hash *hash = NULL;
|
||||
if (e->type == CSERVE2_IMAGE_FILE)
|
||||
|
|
Loading…
Reference in New Issue