From 8cb223d2a21de67253cd56c7fd1e43bfb42966da Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 18:09:49 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-diminished.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/satd-diminished.c b/src/satd-diminished.c index 4316e22..41cb54a 100644 --- a/src/satd-diminished.c +++ b/src/satd-diminished.c @@ -90,11 +90,12 @@ fork_again: case SAT_RUN: image = DAEMON_PREFIX "run"; break; default: fprintf(stderr, "%s: invalid command received.\n", argv[0]); - exit(1); + goto child_fail; } if (dup2(fd, SOCK_FILENO) != -1) close(fd), fd = SOCK_FILENO, execve(image, argv, envp); perror(argv[0]); + child_fail: close(fd); exit(1); default: -- cgit v1.2.3-70-g09d2