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>
This commit is contained in:
Jouni Malinen 2015-01-06 22:54:52 +02:00
parent f2d57282ad
commit 52a80583ba

View 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");