diff dss.c @ 368:ed910547d449

Free x component of DSS key upon failure to load (found by Klocwork)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 02 Nov 2006 14:49:20 +0000
parents c5d3ef11155f
children a124aff0cbf1
line wrap: on
line diff
--- a/dss.c	Sun Mar 26 09:26:43 2006 +0000
+++ b/dss.c	Thu Nov 02 14:49:20 2006 +0000
@@ -90,6 +90,9 @@
 	key->x = m_malloc(sizeof(mp_int));
 	m_mp_init(key->x);
 	ret = buf_getmpint(buf, key->x);
+	if (ret == DROPBEAR_FAILURE) {
+		m_free(key->x);
+	}
 
 	return ret;
 }