summaryrefslogtreecommitdiffstats
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/udev/udevd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 697506feaf..33fc0b3c2c 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -186,6 +186,8 @@ static void worker_free(struct worker *worker) {
free(worker);
}
+DEFINE_TRIVIAL_CLEANUP_FUNC(struct worker *, worker_free);
+
static void manager_workers_free(Manager *manager) {
struct worker *worker;
Iterator i;
@@ -199,7 +201,7 @@ static void manager_workers_free(Manager *manager) {
}
static int worker_new(struct worker **ret, Manager *manager, sd_device_monitor *worker_monitor, pid_t pid) {
- _cleanup_free_ struct worker *worker = NULL;
+ _cleanup_(worker_freep) struct worker *worker = NULL;
int r;
assert(ret);