summaryrefslogtreecommitdiff
path: root/udev/udev-node.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-11-03 00:03:43 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2009-11-03 00:03:43 +0100
commit495d408b36718ec68ed5a3d406bc2e74b7ffc219 (patch)
tree73bc5a72e1b586a60a800d26f61de72800715c64 /udev/udev-node.c
parentf0f7a43f4e60bc2233d86e6f24e2aca2410bc85e (diff)
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
Diffstat (limited to 'udev/udev-node.c')
-rw-r--r--udev/udev-node.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/udev/udev-node.c b/udev/udev-node.c
index 8c2154d37e..24f2ccf618 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;
}