From 8323cd791f792b27d2717c24859d78e8f2faf555 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 1 Sep 2018 09:28:59 +0200 Subject: [PATCH] pki: Fix a memory leak in ssh_pki_do_sign() CID 1395335 Signed-off-by: Andreas Schneider --- src/pki.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pki.c b/src/pki.c index 2531fbed..821df576 100644 --- a/src/pki.c +++ b/src/pki.c @@ -1903,8 +1903,10 @@ ssh_string ssh_pki_do_sign(ssh_session session, SSH_LOG(SSH_LOG_TRACE, "Unknown hash algorithm for type: %d", sig->type); ssh_string_free(session_id); + ssh_buffer_free(buf); return NULL; } + ssh_buffer_free(buf); #ifdef DEBUG_CRYPTO ssh_print_hexa("Hash being signed", hash, hlen);