mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Fix a resource leak.
This commit is contained in:
@@ -254,6 +254,7 @@ int ssh_pki_import_privkey_file(ssh_session session,
|
|||||||
|
|
||||||
key_buf = malloc(sb.st_size + 1);
|
key_buf = malloc(sb.st_size + 1);
|
||||||
if (key_buf == NULL) {
|
if (key_buf == NULL) {
|
||||||
|
fclose(file);
|
||||||
ssh_set_error_oom(session);
|
ssh_set_error_oom(session);
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user