From 5393c52897ff5b57686c867fcab77f9740f4af24 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 17 Jun 2021 15:21:27 +0900
Subject: [PATCH] udev: make event_free() return NULL
 
Reference:https://github.com/systemd/systemd/commit/5393c52897ff5b57686c867fcab77f9740f4af24.patch
Conflict:NA
---
 src/udev/udevd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 34a5c9d5d8ee..bb7c0eabe420 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -152,9 +152,9 @@ typedef struct Worker {
 typedef struct WorkerMessage {
 } WorkerMessage;
 
-static void event_free(Event *event) {
+static Event *event_free(Event *event) {
         if (!event)
-                return;
+                return NULL;
 
         assert(event->manager);
 
@@ -174,7 +174,7 @@ static void event_free(Event *event) {
                 if (unlink("/run/udev/queue") < 0 && errno != ENOENT)
                         log_warning_errno(errno, "Failed to unlink /run/udev/queue, ignoring: %m");
 
-        free(event);
+        return mfree(event);
 }
 
 static void event_queue_cleanup(Manager *manager, EventState match_state) {
