From e4d9fe05561148861e41a100e706ea86ac99700e 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 318d31e79..2599fc7f2 100644 --- a/agent/call-daemon.c +++ b/agent/call-daemon.c @@ -175,6 +175,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;