client-node: clear resource after freeing mem

Some of the mem unref might send a message to the client.

This is not actually the case right now but just to be safe for the
future.
This commit is contained in:
Wim Taymans 2023-07-10 16:55:05 +02:00
parent a966d4806b
commit 3e0050d1cd

View file

@ -1346,9 +1346,6 @@ static void node_free(void *data)
while ((mm = pw_mempool_find_tag(impl->client->pool, tag, sizeof(uint32_t))) != NULL)
pw_memmap_free(mm);
if (impl->resource)
pw_resource_destroy(impl->resource);
if (impl->activation)
pw_memblock_free(impl->activation);
@ -1358,6 +1355,9 @@ static void node_free(void *data)
}
pw_array_clear(&impl->io_areas);
if (impl->resource)
pw_resource_destroy(impl->resource);
pw_map_clear(&impl->ports[0]);
pw_map_clear(&impl->ports[1]);
pw_map_clear(&impl->io_map);