libsigrok: Quickfix for a segfault in ChronoVu LA8.

This commit is contained in:
Uwe Hermann 2011-12-04 18:33:29 +01:00
parent 276585ff20
commit 25a605d187
1 changed files with 6 additions and 0 deletions

View File

@ -684,11 +684,17 @@ static void hw_cleanup(void)
sr_warn("la8: %s: sdi was NULL, continuing", __func__);
continue;
}
#if 0
/*
* Fixes a segfault as it's free()d elsewhere already.
* TODO: Document who is supposed to free this, and when.
*/
if (sdi->priv != NULL)
free(sdi->priv);
else
sr_warn("la8: %s: sdi->priv was NULL, nothing "
"to do", __func__);
#endif
sr_device_instance_free(sdi); /* Returns void. */
}
g_slist_free(device_instances); /* Returns void. */