client-node: clean up buffers and other memory

This commit is contained in:
Wim Taymans 2019-08-14 11:45:28 +02:00
parent c879b85884
commit d86e462dca
2 changed files with 6 additions and 0 deletions

View file

@ -121,6 +121,8 @@ static void clear_link(struct node_data *data, struct link *link)
static void clean_transport(struct node_data *data)
{
struct link *l;
uint32_t tag[5] = { data->remote_id, };
struct pw_memmap *mm;
if (!data->have_transport)
return;
@ -131,6 +133,9 @@ static void clean_transport(struct node_data *data)
}
pw_array_clear(&data->links);
while ((mm = pw_mempool_find_tag(data->remote->pool, tag, sizeof(uint32_t))) != NULL)
pw_memmap_free(mm);
pw_memmap_free(data->activation);
close(data->rtwritefd);
data->remote_id = SPA_ID_INVALID;