Scubapro G2 cleanup: avoid memory leak

Coverity CID 207807

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Dirk Hohndel 2018-01-04 08:50:18 -08:00 committed by Linus Torvalds
parent c354ae0506
commit fb8115cbc6

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);
}