]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/api.c
hameg-hmo: Make sure the enabled_channels list is empty before populating it
[libsigrok.git] / src / hardware / hameg-hmo / api.c
index c3d7005961b1a67bd14371840a304b13953bb557..7f3d5f549321e0cc6025ee16f7a20624b3da1e44 100644 (file)
@@ -727,6 +727,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        devc = sdi->priv;
        digital_added = FALSE;
 
+       g_slist_free(devc->enabled_channels);
+       devc->enabled_channels = NULL;
+
        for (l = sdi->channels; l; l = l->next) {
                ch = l->data;
                if (!ch->enabled)