From 90eb1c18e0058a7ffae1180f9ecf75044881e1ad Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 21 Feb 2022 08:54:50 +0100 Subject: [PATCH] pulse-server: unlink operation before callback To ensure that the callback can't accidentally find and free the operation. --- src/modules/module-protocol-pulse/operation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/operation.c b/src/modules/module-protocol-pulse/operation.c index b1e0eb08d..1c9833ded 100644 --- a/src/modules/module-protocol-pulse/operation.c +++ b/src/modules/module-protocol-pulse/operation.c @@ -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); }