Free x component of DSS key upon failure to load

(found by Klocwork)

--HG--
extra : convert_revision : 8dd57944c592d5d74680657e437fca8803680bd0
This commit is contained in:
Matt Johnston 2006-11-02 14:49:20 +00:00
parent d57a56407b
commit ee6f01918c

3
dss.c
View File

@ -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;
}