EAP-pwd: Fix couple of memory leaks

This commit is contained in:
Jouni Malinen 2010-09-14 22:16:17 -10:00
parent d52be1db76
commit 3d32c6517d
3 changed files with 19 additions and 4 deletions

View file

@ -245,10 +245,11 @@ int compute_password_element(EAP_PWD_group *grp, u16 num,
grp->group_num = num;
if (0) {
fail:
EC_GROUP_free(grp->group);
EC_POINT_free(grp->pwe);
BN_free(grp->order);
BN_free(grp->prime);
free(grp);
os_free(grp);
grp = NULL;
ret = 1;
}