X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-xstream%2Fprotocol.c;h=8cc2bbd3b060c03b99f9fb49465c7fc5000848bd;hb=b35facebd477aee5e0f0dc705e3421567de4a6b7;hp=a05ff618d5e4c8eeaa1877f6fc46b6ada7ac7875;hpb=36165cf0f7a226f76d3e9832a70e06d9d0d634ec;p=libsigrok.git diff --git a/src/hardware/lecroy-xstream/protocol.c b/src/hardware/lecroy-xstream/protocol.c index a05ff618..8cc2bbd3 100644 --- a/src/hardware/lecroy-xstream/protocol.c +++ b/src/hardware/lecroy-xstream/protocol.c @@ -527,14 +527,9 @@ SR_PRIV int lecroy_xstream_init_device(struct sr_dev_inst *sdi) ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, channel_enabled, (*scope_models[model_index].analog_names)[i]); - devc->analog_groups[i] = g_malloc0(sizeof(struct sr_channel_group)); - - devc->analog_groups[i]->name = g_strdup( - (char *)(*scope_models[model_index].analog_names)[i]); + devc->analog_groups[i] = sr_channel_group_new(sdi, + (*scope_models[model_index].analog_names)[i], NULL); devc->analog_groups[i]->channels = g_slist_append(NULL, ch); - - sdi->channel_groups = g_slist_append(sdi->channel_groups, - devc->analog_groups[i]); } devc->model_config = &scope_models[model_index];