if (check_manufacturer(hw_info->manufacturer) != SR_OK)
goto fail;
- sdi = sr_dev_inst_new();
+ sdi = g_malloc0(sizeof(struct sr_dev_inst));
sdi->status = SR_ST_ACTIVE;
sdi->vendor = g_strdup(hw_info->manufacturer);
sdi->model = g_strdup(hw_info->model);