aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-11-30 17:25:18 +0100
committerFabian Groffen <grobian@gentoo.org>2019-11-30 17:26:43 +0100
commitd1442dee24b0760665a103c5c1b3ad838eef02f9 (patch)
tree72152914aa8a7a4e11ebd6ddac2897fd8c80f10f /libq/atom.c
parenttests: allow running all tests using valgrind (diff)
downloadportage-utils-d1442dee24b0760665a103c5c1b3ad838eef02f9.tar.gz
portage-utils-d1442dee24b0760665a103c5c1b3ad838eef02f9.tar.bz2
portage-utils-d1442dee24b0760665a103c5c1b3ad838eef02f9.zip
misc fixes for valgrind
mainly memory and socket leaks, sometimes using invalid data, this is related to bug #701402 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'libq/atom.c')
-rw-r--r--libq/atom.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libq/atom.c b/libq/atom.c
index 6e12c0a..efd32d1 100644
--- a/libq/atom.c
+++ b/libq/atom.c
@@ -335,6 +335,11 @@ atom_implode(depend_atom *atom)
{
if (!atom)
errf("Atom is empty !");
+ while (atom->usedeps != NULL) {
+ atom_usedep *n = atom->usedeps->next;
+ free(atom->usedeps);
+ atom->usedeps = n;
+ }
free(atom->suffixes);
free(atom);
}