]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
TDLS: Fix an interface addition error path
authorJouni Malinen <j@w1.fi>
Tue, 6 Jan 2015 20:54:52 +0000 (22:54 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 7 Jan 2015 11:19:00 +0000 (13:19 +0200)
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>
src/rsn_supp/tdls.c

index 4baeb3b0d4312f731df482d731dd1a5353aaed68..10413edc5cc27f6da98741a3f2f20cd840947af7 100644 (file)
@@ -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");