From 40707c8bff49f106f8b0c09fee1af08467448bfc Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 22 Oct 2024 09:51:03 +0900 Subject: [PATCH] agent: Fix resource leak for PRIMARY_CTX. * agent/call-daemon.c (wait_child_thread): Call assuan_release for PRIMARY_CTX when it's kept for reuse. -- Signed-off-by: NIIBE Yutaka --- agent/call-daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/call-daemon.c b/agent/call-daemon.c index cf5a0c85f..f7ea0dd51 100644 --- a/agent/call-daemon.c +++ b/agent/call-daemon.c @@ -134,6 +134,9 @@ wait_child_thread (void *arg) } } + if (g->primary_ctx_reusable) + assuan_release (g->primary_ctx); + g->primary_ctx = NULL; g->primary_ctx_reusable = 0;