Merge pull request #1253 from Sasszem/memory-waste

Fix memory waste in allocated_transfers
This commit is contained in:
Michael Ossmann
2023-01-05 15:34:27 -05:00
committed by GitHub

View File

@ -288,7 +288,7 @@ static int allocate_transfers(hackrf_device* const device)
uint32_t transfer_index;
device->transfers = (struct libusb_transfer**) calloc(
TRANSFER_COUNT,
sizeof(struct libusb_transfer));
sizeof(struct libusb_transfer*));
if (device->transfers == NULL) {
return HACKRF_ERROR_NO_MEM;
}