summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-06-05 10:30:36 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-06-05 10:30:36 +0200
commit727b12d6500f6e08c4ae2ad2ce75281f03d0ffcb (patch)
treeeebe1da86c2d630ac2ffcc453006308afcea8419
parent94aa758d0c4c3d01d70e2480db63224250a47d89 (diff)
libudev: fix fd leak in udev_enumerate_scan_devices() when tags are searched
Thanks to Lennart for finding this.
-rw-r--r--Makefile.am2
-rw-r--r--libudev/libudev-enumerate.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index caca2555ff..bafe4c7fac 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 da831449dc..f13e56f2f7 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);