mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
Free x component of DSS key upon failure to load
(found by Klocwork) --HG-- extra : convert_revision : 8dd57944c592d5d74680657e437fca8803680bd0
This commit is contained in:
parent
d57a56407b
commit
ee6f01918c
3
dss.c
3
dss.c
@ -90,6 +90,9 @@ int buf_get_dss_priv_key(buffer* buf, dss_key *key) {
|
|||||||
key->x = m_malloc(sizeof(mp_int));
|
key->x = m_malloc(sizeof(mp_int));
|
||||||
m_mp_init(key->x);
|
m_mp_init(key->x);
|
||||||
ret = buf_getmpint(buf, key->x);
|
ret = buf_getmpint(buf, key->x);
|
||||||
|
if (ret == DROPBEAR_FAILURE) {
|
||||||
|
m_free(key->x);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user