From e8b9767f515a3bbd7d3a951c74eca44707913681 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 2 Sep 2024 23:43:53 +0200 Subject: [PATCH] core/manager: close all cmsg fds where none is expected --- src/core/manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/manager.c b/src/core/manager.c index 22417082974..3f6cb3944a7 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -4942,6 +4942,8 @@ static int manager_dispatch_handoff_timestamp_fd(sd_event_source *source, int fd if (n < 0) return log_error_errno(n, "Failed to receive handoff timestamp message: %m"); + cmsg_close_all(&msghdr); + if (msghdr.msg_flags & MSG_TRUNC) { log_warning("Got truncated handoff timestamp message, ignoring."); return 0;