wlantest: Fix error path in TDLS-not-found case

This commit is contained in:
Jouni Malinen 2010-12-17 08:26:39 +02:00
parent 30e09b0d75
commit 4d00fe48e3

View file

@ -270,7 +270,9 @@ 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)
if (tdls == NULL)
return;
tdls->link_up = 1;
if (tdls_derive_tpk(tdls, bssid, elems.ftie, elems.ftie_len) < 1)
return;
@ -363,10 +365,11 @@ 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);
}
}
static void rx_data_tdls(struct wlantest *wt, const u8 *bssid,