mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common/exechelp: Fix error handling.
* common/exechelp-w32.c (gnupg_spawn_process): Close the right handle. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
b0125ae985
commit
f5a4b6a3a3
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ gnupg_spawn_process (const char *pgmname, const char *argv[],
|
|||
if (infp)
|
||||
es_fclose (infp);
|
||||
else if (inpipe[1] != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (outpipe[1]);
|
||||
CloseHandle (inpipe[1]);
|
||||
if (inpipe[0] != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (inpipe[0]);
|
||||
return err;
|
||||
|
@ -466,7 +466,7 @@ gnupg_spawn_process (const char *pgmname, const char *argv[],
|
|||
if (infp)
|
||||
es_fclose (infp);
|
||||
else if (inpipe[1] != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (outpipe[1]);
|
||||
CloseHandle (inpipe[1]);
|
||||
if (inpipe[0] != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (inpipe[0]);
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue