module: postpone lt_dlclose() until a safe time
authorTanu Kaskinen <tanuk@iki.fi>
Wed, 21 Sep 2016 09:55:08 +0000 (12:55 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 12 Dec 2016 15:18:49 +0000 (17:18 +0200)
commit509cfd9138c59802ece75e8ebd43b0b07c28c6d0
tree6eb9b9ece70356b501f541c50d7b58dfcf858eeb
parentc81f3da53b908a05e6325b6bc0dfb4cd5b08f8ec
module: postpone lt_dlclose() until a safe time

When unloading a module, lt_dlclose() may remove the module from memory.
If a module unloads itself, it's not safe to call lt_dlclose()
synchronously from pa_module_unload(), because the execution may return
to the module code that was removed from memory. To avoid this
situation, let's postpone lt_dlclose() until it's safe to call it.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96831
src/pulsecore/module.c