Parcourir la source

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>
Jouni Malinen il y a 10 ans
Parent
commit
52a80583ba
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      src/rsn_supp/tdls.c

+ 2 - 0
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");