chiark / gitweb /
build-sys: add one more Makefile symlink
[elogind.git] / src / udev / udev-ctrl.c
index 7b5ef6b2a8e6fbfcd71659722cc8aeeeb6ac6a4b..c0c5981db8c5a3a1e9619bdaa770d8afeaa9973c 100644 (file)
  */
 
 #include <errno.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
 #include <unistd.h>
-#include <sys/types.h>
 #include <poll.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -377,6 +375,9 @@ struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl_connection *conn) {
                 log_error_errno(errno, "unable to receive ctrl message: %m");
                 goto err;
         }
+
+        cmsg_close_all(&smsg);
+
         cmsg = CMSG_FIRSTHDR(&smsg);
         cred = (struct ucred *) CMSG_DATA(cmsg);