From ac5c41ab70b1975d880ba86ece6f49bbc6bac44a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 6 Jun 2011 18:50:13 +0200 Subject: [PATCH] udev-acl: fix memleak --- extras/udev-acl/udev-acl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c index 35bad760..41e2536e 100644 --- a/extras/udev-acl/udev-acl.c +++ b/extras/udev-acl/udev-acl.c @@ -288,8 +288,10 @@ static void apply_acl_to_devices(uid_t uid, int add) if (device == NULL) continue; node = udev_device_get_devnode(device); - if (node == NULL) + if (node == NULL) { + udev_device_unref(device); continue; + } set_facl(node, uid, add); udev_device_unref(device); } -- 2.39.5