ethumb - fix asan complaint on mis-accessing struct after free in client

@fix
This commit is contained in:
Carsten Haitzler 2021-01-24 15:59:55 +00:00
parent c40e80dd48
commit d37958c1b0
1 changed files with 9 additions and 2 deletions

View File

@ -204,6 +204,7 @@ _ethumb_client_free(Ethumb_Client *client)
if (client->invalid)
return;
if (client->dbus_pending)
{
Eldbus_Pending *pending;
EINA_LIST_FREE(client->dbus_pending, pending)
@ -216,8 +217,11 @@ _ethumb_client_free(Ethumb_Client *client)
struct _ethumb_pending_add *pending = data;
if (pending->pending_call)
{
eldbus_pending_cancel(pending->pending_call);
Eldbus_Pending *call = pending->pending_call;
pending->pending_call = NULL;
pending->client = NULL;
eldbus_pending_cancel(call);
}
else
{
@ -245,8 +249,11 @@ _ethumb_client_free(Ethumb_Client *client)
pending->free_data(pending->data);
if (pending->pending_call)
{
eldbus_pending_cancel(pending->pending_call);
Eldbus_Pending *call = pending->pending_call;
pending->pending_call = NULL;
pending->client = NULL;
eldbus_pending_cancel(call);
}
else
{