gst: only remove port once

The port has node_data set/cleared when it is added/removed to/from
the node. Make sure we only remove the port once to avoid a valgrind
error.
This commit is contained in:
Wim Taymans 2024-03-12 16:54:50 +01:00
parent 7a9dfc188a
commit 4437f6e000

View file

@ -486,7 +486,10 @@ destroy_port (void *data)
{
struct port_data *pd = data;
pw_log_debug("destroy %p", pd);
spa_list_remove(&pd->link);
if (pd->node_data != NULL) {
spa_list_remove(&pd->link);
pd->node_data = NULL;
}
}
static const struct pw_proxy_events proxy_port_events = {