From c62c92caa7f45604dfd01b5845ea7349b8c0e593 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 17 Apr 2015 14:41:01 +0200 Subject: [PATCH 2/2] loader: don't leak udev_enumerate https://bugs.freedesktop.org/show_bug.cgi?id=90073 --- src/loader/loader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/loader/loader.c b/src/loader/loader.c index 17bf133..ec3b278 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -247,6 +247,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, @@ -281,6 +283,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); -- 2.1.0