mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Fix another memory leak on invalid nid value
In 906cc7e7e9 a memory leak was fixed but
a similar one is present here that needs a fix as well.
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -1218,6 +1218,10 @@ int pki_import_privkey_buffer(enum ssh_keytypes_e type,
|
|||||||
nid = pki_key_ecdsa_nid_from_name(ssh_string_get_char(i));
|
nid = pki_key_ecdsa_nid_from_name(ssh_string_get_char(i));
|
||||||
SSH_STRING_FREE(i);
|
SSH_STRING_FREE(i);
|
||||||
if (nid == -1) {
|
if (nid == -1) {
|
||||||
|
ssh_string_burn(e);
|
||||||
|
SSH_STRING_FREE(e);
|
||||||
|
ssh_string_burn(exp);
|
||||||
|
SSH_STRING_FREE(exp);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user