mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-16 02:27:32 -05:00
Fix another giant batch of resource leaks. (Mostly memory, but there's
one missing fclose too.) [originally from svn r9919]
This commit is contained in:
2
sshrsa.c
2
sshrsa.c
@ -413,6 +413,7 @@ int rsa_verify(struct RSAKey *key)
|
||||
pm1 = copybn(key->p);
|
||||
decbn(pm1);
|
||||
ed = modmul(key->exponent, key->private_exponent, pm1);
|
||||
freebn(pm1);
|
||||
cmp = bignum_cmp(ed, One);
|
||||
sfree(ed);
|
||||
if (cmp != 0)
|
||||
@ -421,6 +422,7 @@ int rsa_verify(struct RSAKey *key)
|
||||
qm1 = copybn(key->q);
|
||||
decbn(qm1);
|
||||
ed = modmul(key->exponent, key->private_exponent, qm1);
|
||||
freebn(qm1);
|
||||
cmp = bignum_cmp(ed, One);
|
||||
sfree(ed);
|
||||
if (cmp != 0)
|
||||
|
Reference in New Issue
Block a user