summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Clément Decoodt2023-03-01 10:08:56 +0100
committerGravatar Clément Decoodt2023-03-01 10:08:56 +0100
commitdca3373850f5db6ecef77c99cd7c391037bc114e (patch)
tree5009b01a50e489f8000234a45f0eefb09b6e8638
parente55e6e7c6cdcd7954de339be286b3818da69cddd (diff)
downloadusbmuxd-dca3373850f5db6ecef77c99cd7c391037bc114e.tar.gz
usbmuxd-dca3373850f5db6ecef77c99cd7c391037bc114e.tar.bz2
Fix use-after-free on get_mode_cb
-rw-r--r--src/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usb.c b/src/usb.c
index c98b58a..3c97b65 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -683,8 +683,8 @@ static void get_mode_cb(struct libusb_transfer* transfer)
if(transfer->status != LIBUSB_TRANSFER_COMPLETED) {
usbmuxd_log(LL_ERROR, "Failed to request get mode for device %i-%i (%i). Completing initialization in current mode",
context->bus, context->address, transfer->status);
- free(context);
device_complete_initialization(context, transfer->dev_handle);
+ free(context);
return;
}