diff options
author | Justus Winter <justus@g10code.com> | 2016-01-19 13:09:06 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-02-23 11:58:20 +0100 |
commit | f5a4b6a3a39a2b78d33769184d6133d5e256e02c (patch) | |
tree | 27f44735e4c8008cdb3817690efa05e58d151c26 /common | |
parent | common/exechelp: Fix pipe creation. (diff) | |
download | gnupg2-f5a4b6a3a39a2b78d33769184d6133d5e256e02c.tar.xz gnupg2-f5a4b6a3a39a2b78d33769184d6133d5e256e02c.zip |
common/exechelp: Fix error handling.
* common/exechelp-w32.c (gnupg_spawn_process): Close the right handle.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/exechelp-w32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index 7439c0b91..1b3d072ce 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -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; |