From 29d5bac956e12719ef61e7e6da71333eac735ae1 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Wed, 18 Jun 2014 20:34:52 +0200 Subject: [PATCH] socket: check return from exec_spawn (cherry picked from commit cee288adf88844acd880e4c0da5ed550c85cdd1a) --- src/core/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/socket.c b/src/core/socket.c index 94eb2e7a..c58a7f03 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)