]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds: Fix wrong channel group malloc size.
authorMartin Ling <redacted>
Wed, 18 Mar 2015 16:35:08 +0000 (16:35 +0000)
committerMartin Ling <redacted>
Thu, 19 Mar 2015 23:01:50 +0000 (23:01 +0000)
src/hardware/rigol-ds/api.c

index 5da9a5eaec94619afb190138859caaff21f15291..e2e78aa3fce99190040f13962e0d1a57429b4813 100644 (file)
@@ -356,7 +356,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
        }
 
        if (devc->model->has_digital) {
-               devc->digital_group = g_malloc0(sizeof(struct sr_channel_group*));
+               devc->digital_group = g_malloc0(sizeof(struct sr_channel_group));
 
                for (i = 0; i < ARRAY_SIZE(devc->digital_channels); i++) {
                        if (!(channel_name = g_strdup_printf("D%d", i)))