w32: Don't use CloseHandle on an arbitrary integer.

* src/assuan-support.c (my_waitpid): Do not close the PID = it is not
a handle.
--

At some time in the distant past we might have used the process object
as pid which obviously required a close.  However this was changed and
so what we did here was to close an arbitrary handle (one which
matches the pid).

GnuPG-bug-id: 4237
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2018-11-02 11:26:19 +01:00
parent da89528ac3
commit 4faa0ccf58
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -219,7 +219,7 @@ my_waitpid (assuan_context_t ctx, pid_t pid,
(void)nowait;
(void)status;
(void)options;
CloseHandle ((HANDLE) pid);
(void)pid; /* Just a number without a kernel object. */
#else
/* We can't just release the PID, a waitpid is mandatory. But
NOWAIT in POSIX systems just means the caller already did the