From 727b12d6500f6e08c4ae2ad2ce75281f03d0ffcb Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sat, 5 Jun 2010 10:30:36 +0200 Subject: [PATCH] libudev: fix fd leak in udev_enumerate_scan_devices() when tags are searched Thanks to Lennart for finding this. --- Makefile.am | 2 +- libudev/libudev-enumerate.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index caca2555..bafe4c7f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,7 @@ CLEANFILES = # libudev # ------------------------------------------------------------------------------ LIBUDEV_CURRENT=8 -LIBUDEV_REVISION=2 +LIBUDEV_REVISION=3 LIBUDEV_AGE=8 SUBDIRS += libudev/docs diff --git a/libudev/libudev-enumerate.c b/libudev/libudev-enumerate.c index da831449..f13e56f2 100644 --- a/libudev/libudev-enumerate.c +++ b/libudev/libudev-enumerate.c @@ -735,6 +735,7 @@ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate) syspath_add(udev_enumerate, udev_device_get_syspath(dev)); udev_device_unref(dev); } + closedir(dir); } } else { util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/subsystem", NULL); -- 2.39.5