mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Fix another memory leak on invalid nid value
In906cc7e7e9a 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> (cherry picked from commite4c5f6d3d9)
This commit is contained in:
committed by
Jakub Jelen
parent
0cceefd49d
commit
1fc8266fcb
@@ -1160,6 +1160,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