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 | ee6f01918cf4a2eee1dabd34798533bfcb5e28fb (patch) | |
tree | 6b7c19196fce2ec5dbf1e3af2b5aad5a27175a56 | |
parent | d57a56407b3230672d9320d25d11fc2ec58e359f (diff) |
Free x component of DSS key upon failure to load
(found by Klocwork)
--HG--
extra : convert_revision : 8dd57944c592d5d74680657e437fca8803680bd0
-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; } |