EAP-pwd: Fix a memory leak in hunting-and-pecking loop
tmp2 (y^2) was derived once in each iteration of the loop and only freed after all the loop iterations. Fix this by freeing the temporary value during each iteration. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
dc0f727c99
commit
fda7660106
1 changed files with 1 additions and 0 deletions
|
@ -238,6 +238,7 @@ int compute_password_element(EAP_PWD_group *grp, u16 num,
|
|||
*
|
||||
* y^2 = x^3 + ax + b
|
||||
*/
|
||||
crypto_bignum_deinit(tmp2, 1);
|
||||
tmp2 = crypto_ec_point_compute_y_sqr(grp->group, x_candidate);
|
||||
if (!tmp2)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in a new issue