summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-18 20:34:52 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-06-18 23:21:00 +0200
commitcee288adf88844acd880e4c0da5ed550c85cdd1a (patch)
tree7503c561b09881ca8ebf112b361956c6d8df2529 /src
parentf7926298e934c91dc2d152f4223cafbd202c907c (diff)
socket: check return from exec_spawn
Diffstat (limited to 'src')
-rw-r--r--src/core/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 94eb2e7a5d..c58a7f03ee 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1343,6 +1343,8 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
NULL,
s->exec_runtime,
&pid);
+ if (r < 0)
+ goto fail;
r = unit_watch_pid(UNIT(s), pid);
if (r < 0)