Cleanup: avoid memory leak

Coverity CID 207807

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-12-28 08:30:17 -08:00
parent ee1699177a
commit 898ce52455

View File

@ -245,7 +245,8 @@ scubapro_g2_device_open(dc_device_t **out, dc_context_t *context, const char *na
const struct usb_id *id = get_usb_id(model);
if (!id) {
ERROR(context, "Unknown USB ID for Scubapro model %#04x", model);
return DC_STATUS_IO;
status = DC_STATUS_IO;
goto error_free;
}
status = dc_usbhid_custom_io(context, id->vendor, id->device);
}