From: Uwe Hermann Date: Sun, 4 Dec 2011 17:33:29 +0000 (+0100) Subject: libsigrok: Quickfix for a segfault in ChronoVu LA8. X-Git-Tag: libsigrok-0.1.0~219 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=25a605d187e9661757a1e5d4bd15fac2b533c296;p=libsigrok.git libsigrok: Quickfix for a segfault in ChronoVu LA8. --- diff --git a/hardware/chronovu-la8/chronovu-la8.c b/hardware/chronovu-la8/chronovu-la8.c index 20ffec9d..e63e3a50 100644 --- a/hardware/chronovu-la8/chronovu-la8.c +++ b/hardware/chronovu-la8/chronovu-la8.c @@ -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. */