sd-bus: do not try to close already closed fd (#8392)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 8 Mar 2018 13:19:35 +0000 (22:19 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Mar 2018 13:19:35 +0000 (14:19 +0100)
Fixes #8376, which is introduced by 2b33ab0957f453a06b58e4bee482f2c2d4e100c1.

src/libsystemd/sd-bus/bus-socket.c

index b5160cf..166fba1 100644 (file)
@@ -960,8 +960,6 @@ int bus_socket_exec(sd_bus *b) {
         if (r == 0) {
                 /* Child */
 
-                safe_close(s[0]);
-
                 if (rearrange_stdio(s[1], s[1], STDERR_FILENO) < 0)
                         _exit(EXIT_FAILURE);