From: Jouni Malinen Date: Tue, 6 Jan 2015 20:54:52 +0000 (+0200) Subject: TDLS: Fix an interface addition error path X-Git-Tag: hostap_2_4~514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52a80583ba56624358cfb1aa4ca6303420859e2f;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 4baeb3b0d..10413edc5 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");