diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-01 09:28:59 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-01 09:41:11 +0200 |
commit | 8323cd791f792b27d2717c24859d78e8f2faf555 (patch) | |
tree | ce87330d4024f801cd37679fd36b25d4c1228723 | |
parent | 461ebd1e2fa7649397348321dc3d702a7d49e18d (diff) | |
download | libssh-8323cd791f792b27d2717c24859d78e8f2faf555.tar.gz libssh-8323cd791f792b27d2717c24859d78e8f2faf555.tar.xz libssh-8323cd791f792b27d2717c24859d78e8f2faf555.zip |
pki: Fix a memory leak in ssh_pki_do_sign()
CID 1395335
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/pki.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |