mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: unlink operation before callback
To ensure that the callback can't accidentally find and free the operation.
This commit is contained in:
parent
d7793501fd
commit
90eb1c18e0
1 changed files with 3 additions and 1 deletions
|
|
@ -82,9 +82,11 @@ void operation_complete(struct operation *o)
|
||||||
|
|
||||||
pw_log_info("[%s]: tag:%u complete", client->name, o->tag);
|
pw_log_info("[%s]: tag:%u complete", client->name, o->tag);
|
||||||
|
|
||||||
|
spa_list_remove(&o->link);
|
||||||
|
|
||||||
if (o->callback)
|
if (o->callback)
|
||||||
o->callback(o->data, client, o->tag);
|
o->callback(o->data, client, o->tag);
|
||||||
else
|
else
|
||||||
reply_simple_ack(client, o->tag);
|
reply_simple_ack(client, o->tag);
|
||||||
operation_free(o);
|
free(o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue