Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#14 usb_free_async should check CloseHandle return value

open
nobody
None
5
2012-07-06
2012-01-30
Kirill Batuzov
No

I believe usb_free_async should check return value of CloseHandle. Otherwise a situation when CloseHandle fails for some reason and not actually closes handle but usb_context_t is being freed nevertheless is entirely possible. This would lead to a resource leak which is nearly impossible to diagnose from a user application.

Discussion