mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
pki: Don't leak memory in pubkey to blob.
This commit is contained in:
@@ -855,12 +855,13 @@ ssh_string pki_publickey_to_blob(const ssh_key key)
|
||||
|
||||
rc = buffer_add_ssh_string(buffer, e);
|
||||
if (rc < 0) {
|
||||
|
||||
ssh_string_burn(e);
|
||||
ssh_string_free(e);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ssh_string_burn(e);
|
||||
ssh_string_free(e);
|
||||
e = NULL;
|
||||
|
||||
break;
|
||||
#endif
|
||||
case SSH_KEYTYPE_UNKNOWN:
|
||||
|
||||
Reference in New Issue
Block a user