From 8dcc52984c137b0aa4e673b86039f1da3370ea91 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 10 Aug 2014 13:26:33 +0900 Subject: [PATCH] ethumb client - fix access to pending struct that has been freed th pending cancel may call callbacks... which can mess with the list and thus the pending_add we have, sso do our work before calling this (like set pending_call to NULL). --- src/lib/ethumb_client/ethumb_client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/ethumb_client/ethumb_client.c b/src/lib/ethumb_client/ethumb_client.c index dbc9681..fa5ff54 100644 --- a/src/lib/ethumb_client/ethumb_client.c +++ b/src/lib/ethumb_client/ethumb_client.c @@ -1112,8 +1112,12 @@ ethumb_client_generate_cancel(Ethumb_Client *client, int id, Ethumb_Client_Gener continue; } if (pending_add->pending_call) - eldbus_pending_cancel(pending_add->pending_call); - pending_add->pending_call = NULL; + { + Eldbus_Pending *call = pending_add->pending_call; + + pending_add->pending_call = NULL; + eldbus_pending_cancel(call); + } found = 1; break; } -- 2.7.4