This small helper will simplify code in many modules. The hooks added through pa_module_hook_connect will be freed just before pa__done is called (so trying to add hooks during pa__done will result in assertion failure).
127e8a1 module: Add hook dynarray
src/pulsecore/module.c | 16 ++++++++++++++++
src/pulsecore/module.h | 4 ++++
2 files changed, 20 insertions(+)
Upstream: cgit.freedesktop.org