From: Lennart Poettering Date: Thu, 19 Jan 2023 21:44:11 +0000 (+0100) Subject: logs-show: use json_variant_unref_many() where appropriate X-Git-Tag: v253-rc1~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ba814df255e5b65c36048355b22f757a0ccb6cb;p=thirdparty%2Fsystemd.git logs-show: use json_variant_unref_many() where appropriate --- 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); }