]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Add NULL pointer validation for ssid for group started event
authorJouni Malinen <j@w1.fi>
Sun, 31 Oct 2010 10:12:07 +0000 (12:12 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 31 Oct 2010 10:12:07 +0000 (12:12 +0200)
It looks likely that ssid is not NULL here, but better keep this
consistent with other uses of ssid pointer in this function.

wpa_supplicant/p2p_supplicant.c

index 0d30c747663578dc6c6aebd6f720c72ac151bdef..6f074595b611e8338e17a3553a8078ae78ced5b8 100644 (file)
@@ -475,7 +475,7 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s,
                wpa_msg(wpa_s->parent, MSG_INFO, P2P_EVENT_GROUP_STARTED
                        "%s GO ssid=\"%s\" freq=%d passphrase=\"%s\" "
                        "go_dev_addr=" MACSTR "%s",
-                       wpa_s->ifname, ssid_txt, ssid->frequency,
+                       wpa_s->ifname, ssid_txt, ssid ? ssid->frequency : 0,
                        ssid && ssid->passphrase ? ssid->passphrase : "",
                        MAC2STR(go_dev_addr),
                        persistent ? " [PERSISTENT]" : "");