1
0
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:
Lennart Poettering 2018-01-04 13:24:40 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 2fa645f1cc
commit 8ed7742aa2

View File

@ -210,13 +210,12 @@ IPAddressAccessItem* ip_address_access_reduce(IPAddressAccessItem *first) {
&b->address,
b->prefixlen,
&a->address);
if (r <= 0)
continue;
if (r > 0) {
/* b covers a fully, then let's drop a */
LIST_REMOVE(items, first, a);
free(a);
break;
}
}
}