From 7a5743031da3a6955b588ad5bba64a54cbecf511 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 23 Apr 2022 20:01:40 +0300 Subject: [PATCH] hidapi, libusb: import mainstream commit 536bad201e --- src/hidapi/libusb/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c index c54746e4d..9cb597fa8 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 */