mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 16:59:03 +03:00
ip-address-access: let's exit the loop after invalidating our entry a (#7803)
CID#1382967
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user