X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshpubk.c;h=1a27c313974506ec4fd9e6051b47e3f414a87c97;hb=510f49e405e71ba5c97875e7a019364e1ef5fac9;hp=a4e4a087ca6caa91467757372041090f1c385d7a;hpb=8afae2a5f8104b7a898cec40c78687137c8afa18;p=PuTTY.git diff --git a/sshpubk.c b/sshpubk.c index a4e4a087..1a27c313 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -309,6 +309,7 @@ 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; @@ -945,6 +946,7 @@ unsigned char *rfc4716_loadpub(FILE *fp, char **algorithm, } *q = '\0'; + sfree(comment); /* *just* in case of multiple Comment headers */ comment = dupstr(line); } else if (!strcmp(line, "Subject") || !strncmp(line, "x-", 2)) { @@ -1090,6 +1092,7 @@ unsigned char *openssh_loadpub(FILE *fp, char **algorithm, *commentptr = comment; else sfree(comment); + sfree(line); return pubblob; error: