1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

pki: Fix a memory leak in ssh_pki_do_sign()

CID 1395335

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-09-01 09:28:59 +02:00
parent 461ebd1e2f
commit 8323cd791f

View File

@@ -1903,8 +1903,10 @@ ssh_string ssh_pki_do_sign(ssh_session session,
SSH_LOG(SSH_LOG_TRACE, "Unknown hash algorithm for type: %d", SSH_LOG(SSH_LOG_TRACE, "Unknown hash algorithm for type: %d",
sig->type); sig->type);
ssh_string_free(session_id); ssh_string_free(session_id);
ssh_buffer_free(buf);
return NULL; return NULL;
} }
ssh_buffer_free(buf);
#ifdef DEBUG_CRYPTO #ifdef DEBUG_CRYPTO
ssh_print_hexa("Hash being signed", hash, hlen); ssh_print_hexa("Hash being signed", hash, hlen);