From 1d9be5b25a8460285c0741a23d9f8927e1b18146 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 21 Feb 2022 08:56:02 +0100 Subject: [PATCH] pulse-server: ref client while completing operations So that an operation can't accidentally free the client. --- src/modules/module-protocol-pulse/pulse-server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index c035840d1..ac8974a34 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -192,8 +192,11 @@ static void manager_sync(void *data) reply_set_client_name(client, client->connect_tag); client->connect_tag = SPA_ID_INVALID; } + + client->ref++; spa_list_consume(o, &client->operations, link) operation_complete(o); + client_unref(client); } static struct stream *find_stream(struct client *client, uint32_t index)