1
0
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:
Andreas Schneider
2011-08-11 12:36:01 +02:00
parent 8bf8a7ef49
commit 1c30c2a510

View File

@@ -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;
} }