diff options
author | Kamil Dudka <kdudka@redhat.com> | 2018-11-07 14:04:54 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2018-11-09 11:02:24 +0000 |
commit | d1095bdf744c190c7e8ff126ba02caea8f63880d (patch) | |
tree | 421a0d2ed7cfaf7a9b30d43851c5f7ae3169d7b4 /Src/exec.c | |
parent | 031afe420725e328e9d7742be69ef0bd81c62b9a (diff) | |
download | zsh-d1095bdf744c190c7e8ff126ba02caea8f63880d.tar.gz zsh-d1095bdf744c190c7e8ff126ba02caea8f63880d.tar.xz zsh-d1095bdf744c190c7e8ff126ba02caea8f63880d.zip |
43723: file descriptor could leak on fork error
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c index c4a2740c0..042ba065a 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4805,7 +4805,8 @@ getoutputfile(char *cmd, char **eptr) } if ((cmdoutpid = pid = zfork(NULL)) == -1) { - /* fork or open error */ + /* fork error */ + close(fd); child_unblock(); return nam; } else if (pid) { |