summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@profusion.mobi>2012-12-21 21:09:45 +0000
committerLeandro Pereira <leandro@profusion.mobi>2012-12-21 21:09:45 +0000
commitda061849b0e00a50d4796f9a8a4fd46f2a2b9489 (patch)
tree0eb1ace8c7d247df7f3a54aeeacae57d59ddc0c1 /src
parent5973f890aa3d41d889e31e475019f120d9fb26ff (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index be306196e7..a969b94f18 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -388,12 +388,12 @@ _open_request_response(File_Data *e, Slave_Msg_Image_Opened *resp, int *size)
388static void 388static void
389_request_failed(Entry *e, Error_Type type EINA_UNUSED) 389_request_failed(Entry *e, Error_Type type EINA_UNUSED)
390{ 390{
391 Eina_List *l; 391 Eina_List *l, *l_next;
392 Reference *ref; 392 Reference *ref;
393 393
394 e->request = NULL; 394 e->request = NULL;
395 395
396 EINA_LIST_FOREACH(e->references, l, ref) 396 EINA_LIST_FOREACH_SAFE(e->references, l, l_next, ref)
397 { 397 {
398 Eina_Hash *hash = NULL; 398 Eina_Hash *hash = NULL;
399 if (e->type == CSERVE2_IMAGE_FILE) 399 if (e->type == CSERVE2_IMAGE_FILE)