From 541d6274829d12686ef2e8a9311be2c9db27a326 Mon Sep 17 00:00:00 2001 From: zuozhiwei Date: Mon, 22 Jun 2026 09:43:45 +0800 Subject: [PATCH] module-rtp: release data_loop on rtp_stream_new error path rtp_stream_new() acquires a data loop with pw_context_acquire_loop() but the out: error path never calls pw_context_release_loop(), leaking the loop reference on every failure after acquisition. Mirror rtp_stream_destroy() and other modules that pair acquire with release. --- src/modules/module-rtp/stream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/module-rtp/stream.c b/src/modules/module-rtp/stream.c index 19ace50b6..0f7d18b38 100644 --- a/src/modules/module-rtp/stream.c +++ b/src/modules/module-rtp/stream.c @@ -1036,6 +1036,8 @@ out: if (impl) { if (impl->stream) pw_stream_destroy(impl->stream); + if (impl->data_loop) + pw_context_release_loop(impl->context, impl->data_loop); free(impl); } errno = -res;