summaryrefslogtreecommitdiff
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2015-04-17 15:13:36 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-11 20:49:25 +0100
commit8108de4774f2542a8fe65de71b82221821f73434 (patch)
treeee25d45e61ca451bc7e5df5efb0b5635fdd801bd /src/loader/loader.c
parentf7008ebcdc4d936e8b2b1a317d870e907e4d369f (diff)
loader: don't leak udev_enumerate
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90073 Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 8780587a72..8da1858734 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -273,6 +273,8 @@ get_render_node_from_id_path_tag(struct udev *udev,
(struct udev_enumerate *));
UDEV_SYMBOL(struct udev_list_entry *, udev_enumerate_get_list_entry,
(struct udev_enumerate *));
+ UDEV_SYMBOL(void, udev_enumerate_unref,
+ (struct udev_enumerate *));
UDEV_SYMBOL(struct udev_list_entry *, udev_list_entry_get_next,
(struct udev_list_entry *));
UDEV_SYMBOL(const char *, udev_list_entry_get_name,
@@ -307,6 +309,8 @@ get_render_node_from_id_path_tag(struct udev *udev,
udev_device_unref(device);
}
+ udev_enumerate_unref(e);
+
if (found) {
path_res = strdup(udev_device_get_devnode(device));
udev_device_unref(device);