changeset 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 36d21680a9d3
children 8eaa6e3ca6eb
files dss.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;
 }