aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-12-17 06:26:39 (GMT)
committerJouni Malinen <j@w1.fi>2010-12-17 06:26:39 (GMT)
commit4d00fe48e3ce935cc04c668c0b0dfd3d94719f5a (patch)
tree3ba31d6f1deba07090e9355145b148434eedd6ce /wlantest
parent30e09b0d75660e55d47f755ba9db95e466c42a9d (diff)
downloadhostap-4d00fe48e3ce935cc04c668c0b0dfd3d94719f5a.zip
hostap-4d00fe48e3ce935cc04c668c0b0dfd3d94719f5a.tar.gz
hostap-4d00fe48e3ce935cc04c668c0b0dfd3d94719f5a.tar.bz2
wlantest: Fix error path in TDLS-not-found case
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_tdls.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/wlantest/rx_tdls.c b/wlantest/rx_tdls.c
index 1602468..0fd4af6 100644
--- a/wlantest/rx_tdls.c
+++ b/wlantest/rx_tdls.c
@@ -270,8 +270,10 @@ static void rx_data_tdls_setup_confirm(struct wlantest *wt, const u8 *bssid,
MAC2STR(elems.link_id + 2 * ETH_ALEN));
tdls = get_tdls(wt, elems.link_id);
- if (tdls)
- tdls->link_up = 1;
+ if (tdls == NULL)
+ return;
+
+ tdls->link_up = 1;
if (tdls_derive_tpk(tdls, bssid, elems.ftie, elems.ftie_len) < 1)
return;
if (tdls_verify_mic(tdls, 3, &elems) == 0) {
@@ -363,9 +365,10 @@ static void rx_data_tdls_teardown(struct wlantest *wt, const u8 *bssid,
MAC2STR(elems.link_id + 2 * ETH_ALEN));
tdls = get_tdls(wt, elems.link_id);
- if (tdls)
+ if (tdls) {
tdls->link_up = 0;
- tdls_verify_mic_teardown(tdls, 4, data, &elems);
+ tdls_verify_mic_teardown(tdls, 4, data, &elems);
+ }
}