summaryrefslogtreecommitdiffhomepage
path: root/dss.c
diff options
context:
space:
mode:
Diffstat (limited to 'dss.c')
-rw-r--r--dss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dss.c b/dss.c
index 95062c6..bcfbb61 100644
--- a/dss.c
+++ b/dss.c
@@ -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;
}