chiark / gitweb /
shared: introduce cmsg_close_all() call
[elogind.git] / src / shared / ask-password-api.c
index d6589a67f695c7db2aed8fc38d38115f47bf06ba..44ebc584914a6b5092835f0560e8ca09c7e7c299 100644 (file)
@@ -21,7 +21,7 @@
 #include <stdbool.h>
 #include <termios.h>
 #include <unistd.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/inotify.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -475,6 +475,8 @@ int ask_password_agent(
                         goto finish;
                 }
 
+                cmsg_close_all(&msghdr);
+
                 if (n <= 0) {
                         log_error("Message too short");
                         continue;