mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pki_container: Use string functions for cleanup
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit c3980d433a)
This commit is contained in:
@@ -133,11 +133,10 @@ static int pki_openssh_import_privkey_blob(ssh_buffer key_blob_buffer,
|
||||
return SSH_OK;
|
||||
fail:
|
||||
ssh_key_free(key);
|
||||
if(privkey != NULL){
|
||||
memset(ssh_string_data(privkey), 0, ssh_string_len(privkey));
|
||||
}
|
||||
SAFE_FREE(pubkey);
|
||||
SAFE_FREE(privkey);
|
||||
|
||||
ssh_string_burn(privkey);
|
||||
ssh_string_free(privkey);
|
||||
ssh_string_free(pubkey);
|
||||
|
||||
return SSH_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user