diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-06-02 00:39:58 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-06-02 00:39:58 -0400 |
commit | b4a0ed03d1f656ac8d4d9e2aab4d83af0f8462eb (patch) | |
tree | 31c9ed17d1e02603602653dc9ff3b06ae2727937 /eval.c | |
parent | 043d273feb30b64eae2057ec4c8af6d674f4f0a1 (diff) | |
download | bfs-b4a0ed03d1f656ac8d4d9e2aab4d83af0f8462eb.tar.xz |
Fix hypothetical leak if waitpid() fails.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |