X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fapi.c;h=9c01ea455077ac8041a75909bba6c59d1e0b846e;hb=f57d8ffe66612a1fdc20ed09c222f8ea59bd84d4;hp=c2abb1fe8208fb07b92a46332abf69968c623b29;hpb=413f1944d166ae4f8f400b01a9467460620ccf8e;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index c2abb1fe..9c01ea45 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -450,7 +450,7 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o Therefore just print an error message, but do not exit with error. */ sr_err("Failed to query for hardware version: %d %s", errno, strerror(errno)); - sdi = sr_dev_inst_new(); + sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->status = SR_ST_INACTIVE; sdi->vendor = g_strdup(VENDOR_MOTECH); sdi->model = g_strdup(models[modelid].modelstr);