]> sigrok.org Git - libsigrok.git/commitdiff
libsigrok: Quickfix for a segfault in ChronoVu LA8.
authorUwe Hermann <redacted>
Sun, 4 Dec 2011 17:33:29 +0000 (18:33 +0100)
committerUwe Hermann <redacted>
Sun, 4 Dec 2011 17:33:29 +0000 (18:33 +0100)
hardware/chronovu-la8/chronovu-la8.c

index 20ffec9d02ce4438e7d666f6894b0b1b2668bfee..e63e3a5069a21178c2f1e44750a92ea200151f25 100644 (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. */