From: Mike Yuan Date: Fri, 26 Apr 2024 03:07:59 +0000 (+0800) Subject: core/namespace: use FOREACH_ARRAY at one more place X-Git-Tag: v256-rc2~181^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16871b608e1958f05e4e4cca99927df57a09b200;p=thirdparty%2Fsystemd.git core/namespace: use FOREACH_ARRAY at one more place --- diff --git a/src/core/namespace.c b/src/core/namespace.c index 763520842d6..88f5d0f1582 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -2644,9 +2644,9 @@ int setup_namespace(const NamespaceParameters *p, char **error_path) { void bind_mount_free_many(BindMount *b, size_t n) { assert(b || n == 0); - for (size_t i = 0; i < n; i++) { - free(b[i].source); - free(b[i].destination); + FOREACH_ARRAY(i, b, n) { + free(i->source); + free(i->destination); } free(b);