From: Martin Pitt Date: Mon, 2 Nov 2009 23:03:43 +0000 (+0100) Subject: fix major fd leak in link handling X-Git-Tag: 174~735 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=495d408b36718ec68ed5a3d406bc2e74b7ffc219;p=systemd 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 --- 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; }