X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fikalogic-scanalogic2%2Fapi.c;h=798ae8bd9468d7414aed939ddd924ee308b48c08;hb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;hp=380443c48304091d3d07ad4ed3cfcf8c8e8e8ac2;hpb=aac29cc192ccf82b64e77b5e6b11b411da32deed;p=libsigrok.git diff --git a/src/hardware/ikalogic-scanalogic2/api.c b/src/hardware/ikalogic-scanalogic2/api.c index 380443c4..798ae8bd 100644 --- a/src/hardware/ikalogic-scanalogic2/api.c +++ b/src/hardware/ikalogic-scanalogic2/api.c @@ -91,11 +91,7 @@ static GSList *scan(GSList *options) continue; } - if (!(devc = g_try_malloc(sizeof(struct dev_context)))) { - sr_err("Device instance malloc failed."); - sr_usb_dev_inst_free(usb); - continue; - } + devc = g_malloc0(sizeof(struct dev_context)); if (!(devc->xfer_in = libusb_alloc_transfer(0))) { sr_err("Transfer malloc failed.");