chiark / gitweb /
libudev: fix fd leak in udev_enumerate_scan_devices() when tags are searched
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 5 Jun 2010 08:30:36 +0000 (10:30 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 5 Jun 2010 08:30:36 +0000 (10:30 +0200)
Thanks to Lennart for finding this.

Makefile.am
libudev/libudev-enumerate.c

index caca255..bafe4c7 100644 (file)
@@ -29,7 +29,7 @@ CLEANFILES =
 # libudev
 # ------------------------------------------------------------------------------
 LIBUDEV_CURRENT=8
-LIBUDEV_REVISION=2
+LIBUDEV_REVISION=3
 LIBUDEV_AGE=8
 
 SUBDIRS += libudev/docs
index da83144..f13e56f 100644 (file)
@@ -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);