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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user