diff --git a/src/core/service.c b/src/core/service.c index 5b0bb76af2d..34d40c69508 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3426,14 +3426,12 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, return 0; } - r = service_add_fd_store(s, fd, fdn, do_poll); + r = service_add_fd_store(s, TAKE_FD(fd), fdn, do_poll); if (r < 0) { log_unit_debug_errno(u, r, "Failed to store deserialized fd '%s', ignoring: %m", fdn); return 0; } - - TAKE_FD(fd); } else if (streq(key, "extra-fd")) { _cleanup_free_ char *fdv = NULL, *fdn = NULL; _cleanup_close_ int fd = -EBADF;