From 495d408b36718ec68ed5a3d406bc2e74b7ffc219 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 3 Nov 2009 00:03:43 +0100 Subject: [PATCH] fix major fd leak in link handling link_find_prioritized(): Properly close directory handles to fix a major fd leak which caused hotplugging to fail entirely in many cases due to having too many open files. https://launchpad.net/bugs/463347 --- udev/udev-node.c | 1 + 1 file changed, 1 insertion(+) diff --git a/udev/udev-node.c b/udev/udev-node.c index 8c2154d3..24f2ccf6 100644 --- a/udev/udev-node.c +++ b/udev/udev-node.c @@ -281,6 +281,7 @@ static const char *link_find_prioritized(struct udev_device *dev, bool add, cons udev_device_unref(dev_db); } } + closedir(dir); return target; } -- 2.39.5