aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_pwd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-09-15 08:16:17 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-15 08:16:17 (GMT)
commit3d32c6517dae078b4b9216e635d1d629fc715a77 (patch)
treef5043ee6b31783963b6b970f3eedffc17eb1ed68 /src/eap_peer/eap_pwd.c
parentd52be1db7602d15185ff5bd1dbfd1b6271156dff (diff)
downloadhostap-3d32c6517dae078b4b9216e635d1d629fc715a77.zip
hostap-3d32c6517dae078b4b9216e635d1d629fc715a77.tar.gz
hostap-3d32c6517dae078b4b9216e635d1d629fc715a77.tar.bz2
EAP-pwd: Fix couple of memory leaks
Diffstat (limited to 'src/eap_peer/eap_pwd.c')
-rw-r--r--src/eap_peer/eap_pwd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
index 42a849f..3baca15 100644
--- a/src/eap_peer/eap_pwd.c
+++ b/src/eap_peer/eap_pwd.c
@@ -142,8 +142,15 @@ static void eap_pwd_deinit(struct eap_sm *sm, void *priv)
EC_POINT_free(data->my_element);
EC_POINT_free(data->server_element);
os_free(data->id_peer);
+ os_free(data->id_server);
os_free(data->password);
- os_free(data->grp);
+ if (data->grp) {
+ EC_GROUP_free(data->grp->group);
+ EC_POINT_free(data->grp->pwe);
+ BN_free(data->grp->order);
+ BN_free(data->grp->prime);
+ os_free(data->grp);
+ }
os_free(data);
}