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).
This commit is contained in:
Carsten Haitzler 2014-08-10 13:26:33 +09:00
parent 3b24c6ce91
commit 8dcc52984c
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}