diff options
Diffstat (limited to 'lib/libusb/libusb10.c')
-rw-r--r-- | lib/libusb/libusb10.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 5767cb2..3b8d567 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -800,6 +800,10 @@ libusb_free_transfer(struct libusb_transfer *uxfer) if (uxfer == NULL) return; /* be NULL safe */ + /* check if we should free the transfer buffer */ + if (uxfer->flags & LIBUSB_TRANSFER_FREE_BUFFER) + free(uxfer->buffer); + sxfer = (struct libusb_super_transfer *)( (uint8_t *)uxfer - sizeof(*sxfer)); |