From 1dd33bf3e4a4390627324e633180eddd84c1c212 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 23 Oct 2023 22:30:28 +0200 Subject: [PATCH] basic/iovec-util: use FOREACH_ARRAY in one more place --- src/basic/iovec-util.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/basic/iovec-util.c b/src/basic/iovec-util.c index 5d70657784c..991889a14eb 100644 --- a/src/basic/iovec-util.c +++ b/src/basic/iovec-util.c @@ -63,11 +63,8 @@ char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const ch } void iovec_array_free(struct iovec *iovec, size_t n) { - if (!iovec) - return; - - for (size_t i = 0; i < n; i++) - free(iovec[i].iov_base); + FOREACH_ARRAY(i, iovec, n) + free(i->iov_base); free(iovec); } -- 2.47.3