WPS ER: Stop AP unlink loop on match
authorJouni Malinen <j@w1.fi>
Sat, 21 Nov 2009 10:18:24 +0000 (12:18 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 21 Nov 2009 10:18:24 +0000 (12:18 +0200)
There is no need to continue through the list after this, since the
same AP entry can only be listed once.

src/wps/wps_er.c

index 898f936..301e416 100644 (file)
@@ -299,6 +299,7 @@ static void wps_er_ap_unlink(struct wps_er *er, struct wps_er_ap *ap)
                                prev->next = ap->next;
                        else
                                er->ap = ap->next;
+                       return;
                }
                prev = tmp;
                tmp = tmp->next;