From 1bfde9dc521a1b4f059e0a33e93a62a73716884f Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Mon, 23 Jan 2017 18:55:20 +0100 Subject: [PATCH] Fix memory leak in bignum_from_decimal Intermediate result values were not freed. --- sshbn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sshbn.c b/sshbn.c index 724cf301..6768204b 100644 --- a/sshbn.c +++ b/sshbn.c @@ -1461,6 +1461,7 @@ Bignum bignum_from_decimal(const char *decimal) tmp = bigmul(result, Ten); tmp2 = bignum_from_long(*decimal - '0'); + freebn(result); result = bigadd(tmp, tmp2); freebn(tmp); freebn(tmp2); -- 2.45.1