1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

legacy: Don't leak the key struct on error.

Found by Coverity.
This commit is contained in:
Andreas Schneider
2012-10-08 21:05:53 +02:00
parent 4e7736444f
commit 029d165b61

View File

@@ -485,6 +485,7 @@ ssh_string publickey_from_file(ssh_session session, const char *filename,
rc = ssh_pki_export_pubkey_blob(key, &key_str);
if (rc < 0) {
ssh_key_free(key);
return NULL;
}