summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-06-02 00:39:58 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-06-02 00:39:58 -0400
commitb4a0ed03d1f656ac8d4d9e2aab4d83af0f8462eb (patch)
tree31c9ed17d1e02603602653dc9ff3b06ae2727937
parent043d273feb30b64eae2057ec4c8af6d674f4f0a1 (diff)
downloadbfs-b4a0ed03d1f656ac8d4d9e2aab4d83af0f8462eb.tar.xz
Fix hypothetical leak if waitpid() fails.
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 808eaf6..87c6932 100644
--- a/eval.c
+++ b/eval.c
@@ -415,7 +415,7 @@ bool eval_exec(const struct expr *expr, struct eval_state *state) {
int status;
if (waitpid(pid, &status, 0) < 0) {
perror("waitpid()");
- return false;
+ goto out_argv;
}
ret = WIFEXITED(status) && WEXITSTATUS(status) == EXIT_SUCCESS;