mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 21:15:03 -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:
parent
1bfde9dc52
commit
8afae2a5f8
@ -309,6 +309,7 @@ int rsakey_pubblob(const Filename *filename, void **blob, int *bloblen,
|
|||||||
*commentptr = commentp ? dupstr(commentp) : NULL;
|
*commentptr = commentp ? dupstr(commentp) : NULL;
|
||||||
*blob = rsa_public_blob(&key, bloblen);
|
*blob = rsa_public_blob(&key, bloblen);
|
||||||
freersakey(&key);
|
freersakey(&key);
|
||||||
|
fclose(fp);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
not_public_either:
|
not_public_either:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user