From: Bastien Nocera Date: Mon, 6 Jun 2011 16:50:13 +0000 (+0200) Subject: udev-acl: fix memleak X-Git-Tag: 174~104 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=ac5c41ab70b1975d880ba86ece6f49bbc6bac44a udev-acl: fix memleak --- diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c index 35bad7603..41e2536e0 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); }