core/namespace: use FOREACH_ARRAY at one more place

This commit is contained in:
Mike Yuan 2024-04-26 11:07:59 +08:00
parent 0afd4d214f
commit 16871b608e
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3

View file

@ -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);