pki: Fix a memory leak in ssh_pki_do_sign()

CID 1395335

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 8323cd791f)
This commit is contained in:
Andreas Schneider
2018-09-01 09:28:59 +02:00
parent 219a311925
commit ffabd8c6ed

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",
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);