commit: d0767ea8eab387c65a90445bfd5d8e6e196c30d6 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sun Feb 6 13:24:54 2022 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sun Feb 6 13:24:54 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d0767ea8
libq/tree: ensure we free cache.store (for Packages file) Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libq/tree.c b/libq/tree.c index 114541d..db0d2d2 100644 --- a/libq/tree.c +++ b/libq/tree.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2021 Gentoo Foundation + * Copyright 2005-2022 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2008 Ned Ludd - <so...@gentoo.org> @@ -194,6 +194,8 @@ tree_close(tree_ctx *ctx) xarrayfree_int(t); } + if (ctx->cache.store != NULL) + free(ctx->cache.store); closedir(ctx->dir); /* closedir() above does this for us: */