module-loopback: cancel pending work items when destroying

This commit is contained in:
Wim Taymans 2021-04-22 17:24:59 +02:00
parent c52637f783
commit 115be6d5fc

View file

@ -263,12 +263,14 @@ static void impl_destroy(struct impl *impl)
pw_properties_free(impl->capture_props);
if (impl->playback_props)
pw_properties_free(impl->playback_props);
pw_work_queue_cancel(impl->work, impl, SPA_ID_INVALID);
free(impl);
}
static void module_destroy(void *data)
{
struct impl *impl = data;
impl->unloading = true;
spa_hook_remove(&impl->module_listener);
impl_destroy(impl);
}