]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshpubk.c
Fix missing options in man pages.
[PuTTY.git] / sshpubk.c
index 30f9e4b331c78b2121c131d59134dbc595c7a282..5dacc97d70a329e1ee9235e847ee04cf8d3769a9 100644 (file)
--- a/sshpubk.c
+++ b/sshpubk.c
@@ -309,6 +309,8 @@ int rsakey_pubblob(const Filename *filename, void **blob, int *bloblen,
             *commentptr = commentp ? dupstr(commentp) : NULL;
         *blob = rsa_public_blob(&key, bloblen);
         freersakey(&key);
+        sfree(line);
+        fclose(fp);
         return 1;
 
       not_public_either:
@@ -1089,6 +1091,7 @@ unsigned char *openssh_loadpub(FILE *fp, char **algorithm,
         *commentptr = comment;
     else
         sfree(comment);
+    sfree(line);
     return pubblob;
 
   error:
@@ -1308,7 +1311,7 @@ int ssh2_save_userkey(const Filename *filename, struct ssh2_userkey *key,
     int passlen;
     int cipherblk;
     int i;
-    char *cipherstr;
+    const char *cipherstr;
     unsigned char priv_mac[20];
 
     /*
@@ -1688,7 +1691,7 @@ int key_type(const Filename *filename)
  * Convert the type word to a string, for `wrong type' error
  * messages.
  */
-char *key_type_to_str(int type)
+const char *key_type_to_str(int type)
 {
     switch (type) {
       case SSH_KEYTYPE_UNOPENABLE: return "unable to open file"; break;