module: remove resource listener in cleanup

Remove the resource listener before destroying the object because that
will trigger the resource cleanup again.
This commit is contained in:
Wim Taymans 2018-09-24 09:30:14 +02:00
parent 8a88c6da53
commit 8a562c4427
2 changed files with 2 additions and 0 deletions

View file

@ -57,6 +57,7 @@ struct link_data {
static void resource_destroy(void *data)
{
struct link_data *ld = data;
spa_hook_remove(&ld->resource_listener);
if (ld->link)
pw_link_destroy(ld->link);
}