Fix USB device leak on connection error

If sc_usb_connect() failed, then the sc_usb_device was never destroyed.

The assignment was mistakenly removed by commit
61969aeb80.
nocleanup
Romain Vimont 2 years ago
parent 8d583d36e2
commit 43ae418752

@ -89,6 +89,8 @@ scrcpy_otg(struct scrcpy_options *options) {
goto end;
}
usb_device_initialized = true;
LOGI("USB device: %s (%04" PRIx16 ":%04" PRIx16 ") %s %s",
usb_device.serial, usb_device.vid, usb_device.pid,
usb_device.manufacturer, usb_device.product);

Loading…
Cancel
Save