[pulseaudio-discuss] [PATCH] module: Fix unsafe iteration
tanu.kaskinen at linux.intel.com
Fri Dec 5 06:35:15 PST 2014
On Fri, 2014-12-05 at 15:14 +0100, David Henningsson wrote:
> It looks like this could cause a problem in case somebody (ab)uses the
> API like:
> pa_module_unload_request(m, true);
> pa_module_unload(c, m, true);
> ...later on, the deferred event triggers, and modules_pending_unload now
> has dangling pointers.
Good point. I already fixed this in v2, because I was thinking that the
pa_hashmap_isempty() assertion in pa_core_free() might not be entirely
safe, but your scenario is even better justification for moving the
pa_hashmap_remove() call to pa_module_unload().
More information about the pulseaudio-discuss