Merge pull request #47 from jzarl/fix-EMFILE

Fix file descriptor leak in wiiuse_os_find on Linux.
This commit is contained in:
Ryan Pavlik
2013-09-27 15:45:14 -07:00

View File

@@ -92,6 +92,7 @@ int wiiuse_os_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {
found_devices = hci_inquiry(device_id, timeout, 128, NULL, &scan_info, IREQ_CACHE_FLUSH);
if (found_devices < 0) {
perror("hci_inquiry");
close(device_sock);
return 0;
}