aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dh.c b/src/dh.c
index 9deea8d5..b4b988d9 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -690,7 +690,8 @@ int ssh_server_dh_process_init(ssh_session session, ssh_buffer packet)
pubkey_blob,
session->next_crypto->f,
sig_blob);
- ssh_string_free(sig_blob);
+ SSH_STRING_FREE(sig_blob);
+ SSH_STRING_FREE(pubkey_blob);
if(rc != SSH_OK) {
ssh_set_error_oom(session);
ssh_buffer_reinit(session->out_buffer);
@@ -717,6 +718,8 @@ error:
if (!bignum_ctx_invalid(ctx)) {
bignum_ctx_free(ctx);
}
+ SSH_STRING_FREE(sig_blob);
+ SSH_STRING_FREE(pubkey_blob);
session->session_state = SSH_SESSION_STATE_ERROR;
ssh_dh_cleanup(session->next_crypto);