TDLS: Fix TPK M1 error case (CID 68214)
Commit 342bce63cd
introduced a possibility
of a NULL pointer dereference on the error path if a new peer entry
fails to get added (i.e., memory allocation failure). Fix that by
skipping the wpa_tdls_peer_free() call if necessary.
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
d1bb7aeda4
commit
7efc7f66b1
1 changed files with 2 additions and 1 deletions
|
@ -1920,7 +1920,8 @@ skip_rsn_check:
|
||||||
error:
|
error:
|
||||||
wpa_tdls_send_error(sm, src_addr, WLAN_TDLS_SETUP_RESPONSE, dtoken,
|
wpa_tdls_send_error(sm, src_addr, WLAN_TDLS_SETUP_RESPONSE, dtoken,
|
||||||
status);
|
status);
|
||||||
wpa_tdls_peer_free(sm, peer);
|
if (peer)
|
||||||
|
wpa_tdls_peer_free(sm, peer);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue