aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-01-06 20:54:52 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-07 11:19:00 (GMT)
commit52a80583ba56624358cfb1aa4ca6303420859e2f (patch)
tree2b0efebb6b35062759875fb58fb0eb43e8c4a8f4 /src/rsn_supp
parentf2d57282ad45ce78d21d5e3718affb3b12f28776 (diff)
downloadhostap-52a80583ba56624358cfb1aa4ca6303420859e2f.zip
hostap-52a80583ba56624358cfb1aa4ca6303420859e2f.tar.gz
hostap-52a80583ba56624358cfb1aa4ca6303420859e2f.tar.bz2
TDLS: Fix an interface addition error path
It is possible for wpa_tdls_teardown_peers() to be called with sm == NULL in case interface addition fails before the WPA state machine is initialized. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/tdls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index 4baeb3b..10413ed 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -2776,6 +2776,8 @@ void wpa_tdls_teardown_peers(struct wpa_sm *sm)
{
struct wpa_tdls_peer *peer, *tmp;
+ if (!sm)
+ return;
peer = sm->tdls;
wpa_printf(MSG_DEBUG, "TDLS: Tear down peers");