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
This commit is contained in:
Martin Pitt 2009-11-03 00:03:43 +01:00
parent f0f7a43f4e
commit 495d408b36

View File

@ -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;
}