mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Fix memleak in privatekey_from_file().
This commit is contained in:
@@ -287,6 +287,11 @@ ssh_private_key privatekey_from_file(ssh_session session,
|
||||
privkey->dsa_priv = key->dsa;
|
||||
privkey->rsa_priv = key->rsa;
|
||||
|
||||
key->dsa = NULL;
|
||||
key->rsa = NULL;
|
||||
|
||||
ssh_key_free(key);
|
||||
|
||||
return privkey;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user