agent,w32: Fix resource leak for a process.

* agent/call-daemon.c (wait_child_thread): Call assuan_set_flag only
for !HAVE_W32_SYSTEM.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-05-25 11:07:51 +09:00
parent 80097bc78b
commit 6a2cb8cfd7
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
1 changed files with 2 additions and 2 deletions

View File

@ -153,6 +153,8 @@ wait_child_thread (void *arg)
name, WSTOPSIG (wstatus));
goto again;
}
assuan_set_flag (g->primary_ctx, ASSUAN_NO_WAITPID, 1);
}
#endif /*!HAVE_W32_SYSTEM*/
@ -166,8 +168,6 @@ wait_child_thread (void *arg)
}
else
{
assuan_set_flag (g->primary_ctx, ASSUAN_NO_WAITPID, 1);
for (sl = g->local_list; sl; sl = sl->next_local)
{
sl->invalid = 1;