aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Staletic <boris.staletic@protonmail.com>2024-03-28 20:57:26 +0100
committerFabian Groffen <grobian@gentoo.org>2024-03-29 11:58:23 +0100
commitad4eb81f3fda3b3df705c48c875c901f814ec74a (patch)
tree7568fac25207453a03331a94304e85061035bff5
parentqlop: Properly handle atom_compar_cb when called from qsort (diff)
downloadportage-utils-ad4eb81f3fda3b3df705c48c875c901f814ec74a.tar.gz
portage-utils-ad4eb81f3fda3b3df705c48c875c901f814ec74a.tar.bz2
portage-utils-ad4eb81f3fda3b3df705c48c875c901f814ec74a.zip
qlop: Do not leak avgs array in predict mode
Previously, `values_set(merge_averages, avgs)` would allocate `avgs`, then it would be used in `array_for_each(atoms, i, atom)`, but a call to `xarrayfree_int(avgs)` was missing after the loop. Hopefully, this, along with #26, will solve the issues from #19. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--qlop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qlop.c b/qlop.c
index cfad246..ae0bc3b 100644
--- a/qlop.c
+++ b/qlop.c
@@ -1324,6 +1324,7 @@ static int do_emerge_log(
}
}
}
+ xarrayfree_int(avgs);
}
{