commit: 6925dd5d04d79ea510a9de620d00fcdd54f30394 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Tue Nov 15 02:36:19 2016 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Tue Nov 15 02:36:19 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6925dd5d
qlist: fix leakage with matched atoms qlist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qlist.c b/qlist.c index 4ea3810..91ed45c 100644 --- a/qlist.c +++ b/qlist.c @@ -411,6 +411,9 @@ int qlist_main(int argc, char **argv) state.atoms = xcalloc(argc - optind, sizeof(*state.atoms)); ret = q_vdb_foreach_pkg_sorted(qlist_cb, &state); free(state.buf); + for (i = optind; i < state.argc; ++i) + if (state.atoms[i - optind]) + atom_implode(state.atoms[i - optind]); free(state.atoms); /* The return value is whether we matched anything. */