From: Lennart Poettering Date: Tue, 4 Apr 2023 14:25:33 +0000 (+0200) Subject: service: use newdup() where appropriate X-Git-Tag: v254-rc1~805 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa7c4dd66ea0a7bf4c98a70f41b495a49b923636;p=thirdparty%2Fsystemd.git service: use newdup() where appropriate --- diff --git a/src/core/service.c b/src/core/service.c index da75540c317..48229f96ee3 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1407,10 +1407,9 @@ static int service_collect_fds( /* Pass the per-connection socket */ - rfds = new(int, 1); + rfds = newdup(int, &s->socket_fd, 1); if (!rfds) return -ENOMEM; - rfds[0] = s->socket_fd; rfd_names = strv_new("connection"); if (!rfd_names)