wlantest: Fix error path in TDLS-not-found case
This commit is contained in:
parent
30e09b0d75
commit
4d00fe48e3
1 changed files with 7 additions and 4 deletions
|
@ -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,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue