]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/manager: close all cmsg fds where none is expected
authorMike Yuan <me@yhndnzj.com>
Mon, 2 Sep 2024 21:43:53 +0000 (23:43 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 4 Sep 2024 16:50:55 +0000 (18:50 +0200)
src/core/manager.c

index 2241708297444929ec7790b58e004cfd639289e4..3f6cb3944a7557aa2f6a398c7ab7c654714bb6de 100644 (file)
@@ -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;