mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
ip-address-access: let's exit the loop after invalidating our entry a (#7803)
CID#1382967
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
2fa645f1cc
commit
8ed7742aa2
@@ -210,13 +210,12 @@ IPAddressAccessItem* ip_address_access_reduce(IPAddressAccessItem *first) {
|
||||
&b->address,
|
||||
b->prefixlen,
|
||||
&a->address);
|
||||
if (r <= 0)
|
||||
continue;
|
||||
|
||||
/* b covers a fully, then let's drop a */
|
||||
|
||||
LIST_REMOVE(items, first, a);
|
||||
free(a);
|
||||
if (r > 0) {
|
||||
/* b covers a fully, then let's drop a */
|
||||
LIST_REMOVE(items, first, a);
|
||||
free(a);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user