aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dh.c b/src/dh.c
index b4b988d9..c40aef5a 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -350,6 +350,9 @@ int ssh_dh_init_common(ssh_session session){
break;
}
if (crypto->x == NULL || crypto->y == NULL || crypto->k == NULL){
+ bignum_safe_free(crypto->k);
+ bignum_safe_free(crypto->y);
+ bignum_safe_free(crypto->x);
ssh_set_error_oom(session);
return SSH_ERROR;
} else {