mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 03:00:26 +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);
|
rc = buffer_add_ssh_string(buffer, e);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
|
||||||
ssh_string_burn(e);
|
|
||||||
ssh_string_free(e);
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ssh_string_burn(e);
|
||||||
|
ssh_string_free(e);
|
||||||
|
e = NULL;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case SSH_KEYTYPE_UNKNOWN:
|
case SSH_KEYTYPE_UNKNOWN:
|
||||||
|
|||||||
Reference in New Issue
Block a user