From: Lennart Poettering Date: Wed, 27 Sep 2023 15:21:51 +0000 (+0200) Subject: socket: drop redundant TAKE_FD(cfd) line X-Git-Tag: v255-rc1~392^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=529f768ab85917b5404754334ed0212076e562eb;p=thirdparty%2Fsystemd.git socket: drop redundant TAKE_FD(cfd) line In the only two codepaths we reach this place we know that cfd is already invalidated. In the Accept=yes case there's already a TAKE_FD() a few lines further up, and in the Accept=no case there is no connection fd anyway. --- diff --git a/src/core/socket.c b/src/core/socket.c index 43f412bc895..0b5bfd26487 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -2432,7 +2432,6 @@ static void socket_enter_running(Socket *s, int cfd_in) { unit_add_to_dbus_queue(UNIT(s)); } - TAKE_FD(cfd); return; refuse: