From 8ba814df255e5b65c36048355b22f757a0ccb6cb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 19 Jan 2023 22:44:11 +0100 Subject: [PATCH] logs-show: use json_variant_unref_many() where appropriate --- src/shared/logs-show.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index a43d53073ff..9f51e1ea742 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -1130,12 +1130,8 @@ static int output_json( finish: while ((d = hashmap_steal_first(h))) { - size_t k; - json_variant_unref(d->name); - for (k = 0; k < d->n_values; k++) - json_variant_unref(d->values[k]); - + json_variant_unref_many(d->values, d->n_values); free(d); }