1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-02 12:01:32 +01:00

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

View File

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