hantek-dso: Fix segfault when accessing already free()d memory.
This fix was guessed from other drivers' code. This fixes bug #458.
This commit is contained in:
parent
95983cc3fe
commit
be10b96d40
|
@ -237,6 +237,7 @@ static int configure_channels(const struct sr_dev_inst *sdi)
|
|||
devc = sdi->priv;
|
||||
|
||||
g_slist_free(devc->enabled_channels);
|
||||
devc->enabled_channels = NULL;
|
||||
devc->ch_enabled[0] = devc->ch_enabled[1] = FALSE;
|
||||
for (l = sdi->channels, p = 0; l; l = l->next, p++) {
|
||||
ch = l->data;
|
||||
|
|
Loading…
Reference in New Issue