systemd/0033-socket-check-return-from-exec_spawn.patch
Zbigniew Jędrzejewski-Szmek 5509c00d0f Add some patches
2014-06-23 00:33:25 -04:00

24 lines
787 B
Diff

From 29d5bac956e12719ef61e7e6da71333eac735ae1 Mon Sep 17 00:00:00 2001
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
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)