aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/eapol_test.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-07 09:38:26 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-07 09:38:26 (GMT)
commiteacc12bfbbefc2742b90286063aa8668a1eafc1f (patch)
tree22bb1a3155ac4881b834e81143cc86085f151126 /wpa_supplicant/eapol_test.c
parent09d660b9e3c4b24df6eff8fe409344ef1ad1507a (diff)
downloadhostap-eacc12bfbbefc2742b90286063aa8668a1eafc1f.zip
hostap-eacc12bfbbefc2742b90286063aa8668a1eafc1f.tar.gz
hostap-eacc12bfbbefc2742b90286063aa8668a1eafc1f.tar.bz2
eapol_test: Unregister EAP server methods if CONFIG_AP=y
This fixes a memory leak in CONFIG_AP=y builds.
Diffstat (limited to 'wpa_supplicant/eapol_test.c')
-rw-r--r--wpa_supplicant/eapol_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
index 4eed854..42a7c70 100644
--- a/wpa_supplicant/eapol_test.c
+++ b/wpa_supplicant/eapol_test.c
@@ -22,6 +22,7 @@
#include "config.h"
#include "eapol_supp/eapol_supp_sm.h"
#include "eap_peer/eap.h"
+#include "eap_server/eap_methods.h"
#include "eloop.h"
#include "rsn_supp/wpa.h"
#include "eap_peer/eap_i.h"
@@ -1191,6 +1192,9 @@ int main(int argc, char *argv[])
test_eapol_clean(&eapol_test, &wpa_s);
eap_peer_unregister_methods();
+#ifdef CONFIG_AP
+ eap_server_unregister_methods();
+#endif /* CONFIG_AP */
eloop_destroy();