From: Renato Caldas Date: Wed, 18 Jan 2012 16:03:39 +0000 (+0000) Subject: link-mso19: Prevent double free errors when freeing sdi->priv. X-Git-Tag: libsigrok-0.1.0~170 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e084a8042ea0bccb306e39725de73546138e1adf;p=libsigrok.git link-mso19: Prevent double free errors when freeing sdi->priv. --- diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index 288d2233..fb27c6c4 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -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);