pulse-server: unlink operation before callback

To ensure that the callback can't accidentally find and free the
operation.
This commit is contained in:
Wim Taymans 2022-02-21 08:54:50 +01:00
parent d7793501fd
commit 90eb1c18e0

View file

@ -82,9 +82,11 @@ void operation_complete(struct operation *o)
pw_log_info("[%s]: tag:%u complete", client->name, o->tag);
spa_list_remove(&o->link);
if (o->callback)
o->callback(o->data, client, o->tag);
else
reply_simple_ack(client, o->tag);
operation_free(o);
free(o);
}