]> sigrok.org Git - libsigrok.git/commitdiff
link-mso19: Prevent double free errors when freeing sdi->priv.
authorRenato Caldas <redacted>
Wed, 18 Jan 2012 16:03:39 +0000 (16:03 +0000)
committerRenato Caldas <redacted>
Thu, 19 Jan 2012 11:12:01 +0000 (11:12 +0000)
hardware/link-mso19/link-mso19.c

index 288d2233cdd0780b64469cbde89af506419699fa..fb27c6c438a2a67fda3879d16c4d232f25c2cfcc 100644 (file)
@@ -530,7 +530,10 @@ static void hw_cleanup(void)
                if (sdi->serial->fd != -1)
                        serial_close(sdi->serial->fd);
                if (sdi->priv != NULL)
+               {
                        free(sdi->priv);
+                       sdi->priv = NULL;
+               }
                sr_device_instance_free(sdi);
        }
        g_slist_free(device_instances);