forked from wolfSSL/wolfssl
Fixes memory leak in the wc_RsaFunction if failure happens when using normal math (not fast math) and RSA_LOW_MEM is not defined.
This commit is contained in:
@ -845,7 +845,9 @@ static int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
|
|||||||
mp_clear(&tmpa);
|
mp_clear(&tmpa);
|
||||||
mp_clear(&tmpb);
|
mp_clear(&tmpb);
|
||||||
|
|
||||||
if (ret != 0) return ret;
|
if (ret != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* RSA_LOW_MEM */
|
#endif /* RSA_LOW_MEM */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user