mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix memory leak in bignum_from_decimal
Intermediate result values were not freed.
This commit is contained in:
parent
e882b49051
commit
1bfde9dc52
1
sshbn.c
1
sshbn.c
@ -1461,6 +1461,7 @@ Bignum bignum_from_decimal(const char *decimal)
|
|||||||
|
|
||||||
tmp = bigmul(result, Ten);
|
tmp = bigmul(result, Ten);
|
||||||
tmp2 = bignum_from_long(*decimal - '0');
|
tmp2 = bignum_from_long(*decimal - '0');
|
||||||
|
freebn(result);
|
||||||
result = bigadd(tmp, tmp2);
|
result = bigadd(tmp, tmp2);
|
||||||
freebn(tmp);
|
freebn(tmp);
|
||||||
freebn(tmp2);
|
freebn(tmp2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user