From df3ea8dafa9ce77226830cb11c5a1e0abeb7532c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 9 Nov 2021 23:44:27 +0100 Subject: [PATCH] pipewire: module-profiler: destroy event source Even though all event sources are kept in a list in the current implementation of the event loop in the SPA support plugin, relying on it freeing all sources could lead to unbounded memory use if the profiler module is loaded and unloaded over and over again. --- src/modules/module-profiler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/module-profiler.c b/src/modules/module-profiler.c index aec9949b8..f04e75f12 100644 --- a/src/modules/module-profiler.c +++ b/src/modules/module-profiler.c @@ -346,6 +346,8 @@ static void module_destroy(void *data) pw_properties_free(impl->properties); + pw_loop_destroy_source(pw_context_get_main_loop(impl->context), impl->flush_timeout); + free(impl); }