diff options
author | Matt Johnston <matt@ucc.asn.au> | 2006-11-02 14:49:20 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2006-11-02 14:49:20 +0000 |
commit | 1ac78b3c5fe52644ff261affcbc177efa6e0625f (patch) | |
tree | 6b7c19196fce2ec5dbf1e3af2b5aad5a27175a56 /dss.c | |
parent | e56236b7ee7305582035a0223b6056df7afaedc4 (diff) | |
download | dropbear-1ac78b3c5fe52644ff261affcbc177efa6e0625f.tar.gz |
Free x component of DSS key upon failure to load
(found by Klocwork)
Diffstat (limited to 'dss.c')
-rw-r--r-- | dss.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -90,6 +90,9 @@ int buf_get_dss_priv_key(buffer* buf, dss_key *key) { 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; } |