aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-06-14 14:38:21 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-06-14 16:38:18 +0900
commit681c8cda4c3ce6393f7d84efe6462810bf6bf1d7 (patch)
treecbb4cf0b37887d4010cc7c89b1066f0c42e0db79
parentevas/cserve2: Handle SIGINT properly (diff)
downloadefl-681c8cda4c3ce6393f7d84efe6462810bf6bf1d7.tar.gz
evas/cserve2: (shutdown) fix double free issue
glibc double free happens when shutting down cserve, while requests are being processed. this is because the entry is being deleted from the hash but the cancel request fails (so it should be deleted again from the hash) Another patch going to fix the double free.
-rw-r--r--src/bin/evas/evas_cserve2_cache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index fb76c5577e..ed8f70c243 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -403,7 +403,11 @@ _request_failed(Entry *e, Error_Type type EINA_UNUSED)
else
continue;
- eina_hash_del_by_key(hash, &(ref->client_entry_id));
+ if (type != CSERVE2_REQUEST_CANCEL)
+ {
+ DBG("removing entry %u from hash", ref->client_entry_id);
+ eina_hash_del_by_key(hash, &(ref->client_entry_id));
+ }
}
}