1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 15:18:06 -05:00

Fix resource leak in rsakey_pubblob

The input file was not closed after successfully loading an SSH1 key.
This commit is contained in:
Tim Kosse 2017-01-23 18:58:17 +01:00 committed by Simon Tatham
parent 1bfde9dc52
commit 8afae2a5f8

View File

@ -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);
fclose(fp);
return 1;
not_public_either: