diff options
Diffstat (limited to 'src/nspawn/nspawn-expose-ports.c')
-rw-r--r-- | src/nspawn/nspawn-expose-ports.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nspawn/nspawn-expose-ports.c b/src/nspawn/nspawn-expose-ports.c index b35f8b6a9b..5644068446 100644 --- a/src/nspawn/nspawn-expose-ports.c +++ b/src/nspawn/nspawn-expose-ports.c @@ -73,12 +73,7 @@ int expose_port_parse(ExposePort **l, const char *s) { } void expose_port_free_all(ExposePort *p) { - - while (p) { - ExposePort *q = p; - LIST_REMOVE(ports, p, q); - free(q); - } + LIST_CLEAR(ports, p, free); } int expose_port_flush(FirewallContext **fw_ctx, ExposePort* l, int af, union in_addr_union *exposed) { |