diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-03 18:07:58 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-04 19:58:47 +0200 |
commit | c3980d433a02f00e2a4915278b90dfef804307a4 (patch) | |
tree | 1f93bb160a40faabbcede9b5c877bf34e947ae6e /src/pki_container_openssh.c | |
parent | 78498ee289f7001f0365ea11895214d36427d3d3 (diff) | |
download | libssh-c3980d433a02f00e2a4915278b90dfef804307a4.tar.gz libssh-c3980d433a02f00e2a4915278b90dfef804307a4.tar.xz libssh-c3980d433a02f00e2a4915278b90dfef804307a4.zip |
pki_container: Use string functions for cleanup
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/pki_container_openssh.c')
-rw-r--r-- | src/pki_container_openssh.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pki_container_openssh.c b/src/pki_container_openssh.c index 53e1e7fe..2c4b6c46 100644 --- a/src/pki_container_openssh.c +++ b/src/pki_container_openssh.c @@ -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; } |