summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-settle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udevadm-settle.c')
-rw-r--r--src/udev/udevadm-settle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
index 362c3b2f98..5da0be50d7 100644
--- a/src/udev/udevadm-settle.c
+++ b/src/udev/udevadm-settle.c
@@ -35,6 +35,7 @@
#include <sys/types.h>
#include "udev.h"
+#include "udev-util.h"
#include "util.h"
static void help(void) {
@@ -65,7 +66,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
const char *exists = NULL;
unsigned int timeout = 120;
struct pollfd pfd[1] = { {.fd = -1}, };
- struct udev_queue *udev_queue = NULL;
+ _cleanup_udev_queue_unref_ struct udev_queue *udev_queue = NULL;
int rc = EXIT_FAILURE, c;
while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0)
@@ -229,7 +230,6 @@ static int adm_settle(struct udev *udev, int argc, char *argv[])
out:
if (pfd[0].fd >= 0)
close(pfd[0].fd);
- udev_queue_unref(udev_queue);
return rc;
}