From b4a0ed03d1f656ac8d4d9e2aab4d83af0f8462eb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 2 Jun 2016 00:39:58 -0400 Subject: Fix hypothetical leak if waitpid() fails. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') 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; -- cgit v1.2.3