alsa-monitor: remove listener after destroy

The destroy event will free all the nodes of the device.
This commit is contained in:
Wim Taymans 2020-05-08 17:08:53 +02:00
parent 34da9015b9
commit d22cb01c6e

View file

@ -738,8 +738,8 @@ static void alsa_remove_device(struct impl *impl, struct device *device)
if (device->reserve)
rd_device_destroy(device->reserve);
if (device->sdevice) {
spa_hook_remove(&device->listener);
sm_object_destroy(&device->sdevice->obj);
spa_hook_remove(&device->listener);
}
pw_unload_spa_handle(device->handle);
pw_properties_free(device->props);