void usb_cleanup() { DBG("usb_cleanup\n"); close_usb_devices(); if (currentRunLoop) CFRunLoopStop(currentRunLoop); }
void usb_cleanup() { DBG("usb_cleanup\n"); close_usb_devices(); if (currentRunLoop) CFRunLoopStop(currentRunLoop); if (notificationIterators != NULL) { free(notificationIterators); notificationIterators = NULL; } }
void usb_cleanup() { DBG("usb_cleanup\n"); close_usb_devices(); if (currentRunLoop) { D("Before currentRunLoop stop\n"); CFRunLoopStop(currentRunLoop); } D("After currentRunLoop if\n"); if (notificationIterators != NULL) { D("Before notification free\n"); free(notificationIterators); notificationIterators = NULL; } D("After all\n"); }