]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a memory leak in rsakey_pubblob
authorTim Kosse <tim.kosse@filezilla-project.org>
Mon, 23 Jan 2017 18:04:50 +0000 (19:04 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 28 Jan 2017 14:03:09 +0000 (14:03 +0000)
The line read from the input file was not freed after successfully
loading an SSH1 key.

sshpubk.c

index a4e4a087ca6caa91467757372041090f1c385d7a..6f7513e20eabbc19db275ddf4c334920bab6470e 100644 (file)
--- 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;