tunnel modules: Fix crash when the module was unloaded while waiting for re-init

System Internals / PulseAudio - Georg Chini [chini.tk] - 25 May 2022 07:04 UTC

When the tunnel modules had no connection and a re-init was pending, the module could be unloaded without cancelling the pending re-init. When the timer expired in that situation, this lead to a crash. This patch fixes the problem by keeping a reference when the module is scheduled to be re-initialized.

Part-of:

363a38414 tunnel modules: Fix crash when the module was unloaded while waiting for re-init
src/modules/module-tunnel-sink-new.c | 54 +++++++++++++++--
src/modules/module-tunnel-source-new.c | 58 ++++++++++++++++---
src/modules/module-tunnel.c | 103 +++++++++++++++++++++++----------
src/modules/restart-module.c | 63 ++++++++++++++++----
src/modules/restart-module.h | 12 +++-
5 files changed, 231 insertions(+), 59 deletions(-)

Upstream: cgit.freedesktop.org


  • Share