Fix file descriptor leak in wiiuse_os_find on Linux.

This commit is contained in:
Johannes Zarl
2013-09-23 10:57:04 +02:00
parent 143b682b8e
commit e42cc718b8

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