]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix removal_reason setting to use correct pointer
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 27 Oct 2010 08:47:41 +0000 (11:47 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 27 Oct 2010 08:47:41 +0000 (11:47 +0300)
The previous version triggered a NULL pointer dereference on
P2P_GROUP_REMOVE * command.

wpa_supplicant/p2p_supplicant.c

index 194a430ee1092cb788cfd0e1332938fe2971d5b4..0d30c747663578dc6c6aebd6f720c72ac151bdef 100644 (file)
@@ -2807,7 +2807,7 @@ int wpas_p2p_group_remove(struct wpa_supplicant *wpa_s, const char *ifname)
                while (wpa_s) {
                        prev = wpa_s;
                        wpa_s = wpa_s->next;
-                       wpa_s->removal_reason = P2P_GROUP_REMOVAL_REQUESTED;
+                       prev->removal_reason = P2P_GROUP_REMOVAL_REQUESTED;
                        wpas_p2p_group_delete(prev);
                }
                return 0;