summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-01-24 15:59:55 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-01-24 15:59:55 +0000
commitd37958c1b0b005b8f04a6ee951d83f6af6e79689 (patch)
treeda8eced787c396136fda0f39128c4eb8d049f0a3 /src/lib
parentc40e80dd480f492590fdef5955bcf79f80cc1e53 (diff)
ethumb - fix asan complaint on mis-accessing struct after free in client
@fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ethumb_client/ethumb_client.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/ethumb_client/ethumb_client.c b/src/lib/ethumb_client/ethumb_client.c
index 1175402887..70e56bce94 100644
--- a/src/lib/ethumb_client/ethumb_client.c
+++ b/src/lib/ethumb_client/ethumb_client.c
@@ -204,6 +204,7 @@ _ethumb_client_free(Ethumb_Client *client)
204 if (client->invalid) 204 if (client->invalid)
205 return; 205 return;
206 206
207 if (client->dbus_pending)
207 { 208 {
208 Eldbus_Pending *pending; 209 Eldbus_Pending *pending;
209 EINA_LIST_FREE(client->dbus_pending, pending) 210 EINA_LIST_FREE(client->dbus_pending, pending)
@@ -216,8 +217,11 @@ _ethumb_client_free(Ethumb_Client *client)
216 struct _ethumb_pending_add *pending = data; 217 struct _ethumb_pending_add *pending = data;
217 if (pending->pending_call) 218 if (pending->pending_call)
218 { 219 {
219 eldbus_pending_cancel(pending->pending_call); 220 Eldbus_Pending *call = pending->pending_call;
221
222 pending->pending_call = NULL;
220 pending->client = NULL; 223 pending->client = NULL;
224 eldbus_pending_cancel(call);
221 } 225 }
222 else 226 else
223 { 227 {
@@ -245,8 +249,11 @@ _ethumb_client_free(Ethumb_Client *client)
245 pending->free_data(pending->data); 249 pending->free_data(pending->data);
246 if (pending->pending_call) 250 if (pending->pending_call)
247 { 251 {
248 eldbus_pending_cancel(pending->pending_call); 252 Eldbus_Pending *call = pending->pending_call;
253
254 pending->pending_call = NULL;
249 pending->client = NULL; 255 pending->client = NULL;
256 eldbus_pending_cancel(call);
250 } 257 }
251 else 258 else
252 { 259 {