]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
Remember to close key files when rsakey_encrypted meets a bogus one
authorSimon Tatham <anakin@pobox.com>
Fri, 20 Oct 2000 17:57:47 +0000 (17:57 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 20 Oct 2000 17:57:47 +0000 (17:57 +0000)
git-svn-id: http://svn.tartarus.org/sgt/putty@739 cda61777-01e9-0310-a592-d414129be87e

sshpubk.c

index fd40db7714d2e80b4778935e698456b28cb12c05..fddcf95e2d5f6a068f0a68d5095c4e1c9cf8e623 100644 (file)
--- a/sshpubk.c
+++ b/sshpubk.c
@@ -177,6 +177,7 @@ int rsakey_encrypted(char *filename, char **comment) {
         !strcmp(buf, rsa_signature)) {
         return loadrsakey_main(fp, NULL, NULL, comment, NULL);
     }
+    fclose(fp);
     return 0;                          /* wasn't the right kind of file */
 }