remote-node: clear the node io areas when removing the memory

When the memory is removed, clear the node io areas so that it doesn't
accidentally get reused.

Fixes a crash in cheese when the node is stopped and then resumed.
This commit is contained in:
Wim Taymans 2021-09-15 15:51:41 +02:00
parent 21657ea2af
commit 97be5687ec

View file

@ -144,8 +144,12 @@ static void clean_transport(struct node_data *data)
spa_list_consume(l, &data->links, link) spa_list_consume(l, &data->links, link)
clear_link(data, l); clear_link(data, l);
while ((mm = pw_mempool_find_tag(data->pool, tag, sizeof(uint32_t))) != NULL) while ((mm = pw_mempool_find_tag(data->pool, tag, sizeof(uint32_t))) != NULL) {
if (mm->tag[1] == SPA_ID_INVALID)
spa_node_set_io(data->node->node, mm->tag[2], NULL, 0);
pw_memmap_free(mm); pw_memmap_free(mm);
}
pw_memmap_free(data->activation); pw_memmap_free(data->activation);
data->node->rt.activation = data->node->activation->map->ptr; data->node->rt.activation = data->node->activation->map->ptr;