mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Trivial bug fix pointed out by Paul Fox: potentially missing fclose().
[originally from svn r4877]
This commit is contained in:
parent
4f6e453530
commit
15c96004a7
@ -376,7 +376,8 @@ int saversakey(const Filename *filename, struct RSAKey *key, char *passphrase)
|
|||||||
fp = f_open(*filename, "wb");
|
fp = f_open(*filename, "wb");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
int ret = (fwrite(buf, 1, p - buf, fp) == (size_t) (p - buf));
|
int ret = (fwrite(buf, 1, p - buf, fp) == (size_t) (p - buf));
|
||||||
ret = ret && (fclose(fp) == 0);
|
if (fclose(fp))
|
||||||
|
ret = 0;
|
||||||
return ret;
|
return ret;
|
||||||
} else
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user