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
This commit is contained in:
Juliusz Sosinowicz
2020-05-20 20:34:45 +02:00
parent a6f5bc84e6
commit 986c8f351c

View File

@@ -44418,7 +44418,7 @@ int SetIndividualInternal(WOLFSSL_BIGNUM* bn, mp_int* mpi)
return WOLFSSL_FATAL_ERROR; return WOLFSSL_FATAL_ERROR;
} }
if (mpi == NULL || (mp_init(mpi) != MP_OKAY)) { if (mpi == NULL) {
WOLFSSL_MSG("mpi NULL error"); WOLFSSL_MSG("mpi NULL error");
return WOLFSSL_FATAL_ERROR; return WOLFSSL_FATAL_ERROR;
} }