chiark / gitweb /
socket: check return from exec_spawn
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 18 Jun 2014 18:34:52 +0000 (20:34 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 18 Jun 2014 21:21:00 +0000 (23:21 +0200)
src/core/socket.c

index 94eb2e7a5d2bc1e1f6526374c3d8382dc377add7..c58a7f03ee9336260a7b2a884cb5547edf9d0a2e 100644 (file)
@@ -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)