From 986c8f351c8d065a23e7848f74411d75e3452662 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 20 May 2020 20:34:45 +0200 Subject: [PATCH] Fix leak in SetIndividualInternal SetIndividualInternal should not do mp_init on mpi since it should have been zero'ed during allocation and if it isn't zero'ed then it must mean that memory has already been allocated to it --- src/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index bc14865ad..07f0822ba 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -44418,7 +44418,7 @@ int SetIndividualInternal(WOLFSSL_BIGNUM* bn, mp_int* mpi) return WOLFSSL_FATAL_ERROR; } - if (mpi == NULL || (mp_init(mpi) != MP_OKAY)) { + if (mpi == NULL) { WOLFSSL_MSG("mpi NULL error"); return WOLFSSL_FATAL_ERROR; }