diff options
author | Sean McBride <sean@rogue-research.com> | 2018-12-15 16:12:07 -0500 |
---|---|---|
committer | Nathan Hjelm <hjelmn@me.com> | 2019-01-08 18:08:19 -0700 |
commit | 9a23fe1fd1e8b5035c622e3c6d4ae555513dec3c (patch) | |
tree | 6b97d3a6d655baeb313b280ddb9947b0b971af80 /libusb/os | |
parent | dc2c45c87832dc38090911f8ede008ae978a9c91 (diff) | |
download | libusb-9a23fe1fd1e8b5035c622e3c6d4ae555513dec3c.tar.gz |
Removed unneeded checks for passing null to free()
Closes #507
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
Diffstat (limited to 'libusb/os')
-rw-r--r-- | libusb/os/darwin_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index fde4b6a..46f66ff 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -1675,8 +1675,8 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) { struct darwin_interface *cInterface; - /* construct an array of IOUSBIsocFrames, reuse the old one if possible */ - if (tpriv->isoc_framelist && tpriv->num_iso_packets != transfer->num_iso_packets) { + /* construct an array of IOUSBIsocFrames, reuse the old one if the sizes are the same */ + if (tpriv->num_iso_packets != transfer->num_iso_packets) { free(tpriv->isoc_framelist); tpriv->isoc_framelist = NULL; } |