diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c index d90b4e8c7..3f124ab80 100644 --- a/common/exechelp-posix.c +++ b/common/exechelp-posix.c @@ -997,7 +997,7 @@ gnupg_process_release (gnupg_process_t process) if (!process) return; - if (process->terminated) + if (!process->terminated) { gnupg_process_terminate (process); gnupg_process_wait (process, 1); diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index 08290e442..d1764d1f6 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -1209,7 +1209,7 @@ gnupg_process_release (gnupg_process_t process) if (!process) return; - if (process->terminated) + if (!process->terminated) { gnupg_process_terminate (process); gnupg_process_wait (process, 1);