hidapi, libusb: import mainstream commit 536bad201e
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index c54746e..9cb597f 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -1497,6 +1497,7 @@ void HID_API_EXPORT hid_close(hid_device *dev)
/* Clean up the Transfer objects allocated in read_thread(). */
free(dev->transfer->buffer);
+ dev->transfer->buffer = NULL;
libusb_free_transfer(dev->transfer);
/* release the interface */