commit:     5826ee815228775b61ed1587e1346f764dc93945
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 25 15:04:23 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Sep 25 15:04:23 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=5826ee81

libq/tree: don't close tree in tree_get_atoms

The caller passes tree, so the caller should clean it up.  This fixes
double frees observed in bug #695586

Bug: https://bugs.gentoo.org/695586
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 libq/tree.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libq/tree.c b/libq/tree.c
index 0699334..2797450 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -1078,7 +1078,6 @@ tree_get_atoms(tree_ctx *ctx, bool fullcpv, set *satoms)
        };
 
        tree_foreach_pkg_fast(ctx, tree_get_atoms_cb, &state, NULL);
-       tree_close(ctx);
 
        return state.cpf;
 }

Reply via email to