Commit 7a5743031da3a6955b588ad5bba64a54cbecf511

Ozkan Sezer 2022-04-23T20:01:40

hidapi, libusb: import mainstream commit 536bad201e

1
2
3
4
5
6
7
8
9
10
11
12
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 */