X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fapi.c;h=f0cbb6158276048186c11a6e970f76adb6b683ce;hb=d154c6b69c5e0b364b26700d37dc2d762cf426f7;hp=a3cc8a283304ae233ebb1c857ad13eb08be2e094;hpb=50bc52f3a6102ad687c8abe11cf1e39ab44b1e6a;p=libsigrok.git diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index a3cc8a28..f0cbb615 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -199,10 +199,8 @@ static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof) */ for (i = 0; i < ARRAY_SIZE(channel_names); i++) { ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]); - cg = g_malloc0(sizeof(struct sr_channel_group)); - cg->name = g_strdup(channel_names[i]); + cg = sr_channel_group_new(sdi, channel_names[i], NULL); cg->channels = g_slist_append(cg->channels, ch); - sdi->channel_groups = g_slist_append(sdi->channel_groups, cg); } devc = g_malloc0(sizeof(struct dev_context));