Browse Source

P2P: Use consistent checking of ssid != NULL

Jouni Malinen 13 years ago
parent
commit
21fe9e757e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wpa_supplicant/p2p_supplicant.c

+ 1 - 1
wpa_supplicant/p2p_supplicant.c

@@ -557,7 +557,7 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s,
 	if (persistent)
 		network_id = wpas_p2p_store_persistent_group(wpa_s->parent,
 							     ssid, go_dev_addr);
-	if (network_id < 0)
+	if (network_id < 0 && ssid)
 		network_id = ssid->id;
 	if (!client)
 		wpas_notify_p2p_group_started(wpa_s, ssid, network_id, 0);