From 953a1665e2a3ea0423f3deb2a71972486d0ee61e Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Sun, 2 Jul 2017 12:32:47 +0200 Subject: [PATCH] Fix a memleak in ec_GFp_mont_group_set_curve. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3828) --- crypto/ec/ecp_mont.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c index b2de7faea7..43c4330cb0 100644 --- a/crypto/ec/ecp_mont.c +++ b/crypto/ec/ecp_mont.c @@ -247,6 +247,8 @@ int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, BN_CTX_free(new_ctx); if (mont != NULL) BN_MONT_CTX_free(mont); + if (one != NULL) + BN_free(one); return ret; } -- 2.25.1