[Reproducible-commits] [dpkg] 19/32: dpkg: Fix varbuf memory leaks
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Nov 6 14:02:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit af5a9c80d49839d44c1ea87e17e50be27e09204f
Author: Guillem Jover <guillem at debian.org>
Date: Sat Oct 17 05:54:25 2015 +0200
dpkg: Fix varbuf memory leaks
In «dpkg --verify» and the dpkg infodb format upgrade logic.
Both are not big leaks, the first is bound by the amount of packages,
as the varbuf is reused for each file on each package, and the second
is just one instance of a leaked varbuf.
Stable-Candidate: 1.16.x 1.17.x
---
debian/changelog | 1 +
src/infodb-upgrade.c | 1 +
src/verify.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 82f811a..a153236 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ dpkg (1.18.4) UNRELEASED; urgency=low
state, otherwise we end up not passing the previously configured version
to «postinst configure», which might consider this a first install instead
of an upgrade. Closes: #801156
+ * Fix memory leaks in «dpkg --verify» and dpkg infodb format upgrade logic.
* Build system:
- Set PERL5LIB globally for the test suite to the local modules directory,
to avoid using the system modules. Regression introduced in dpkg 1.17.8.
diff --git a/src/infodb-upgrade.c b/src/infodb-upgrade.c
index 0f5d11d..1a8e144 100644
--- a/src/infodb-upgrade.c
+++ b/src/infodb-upgrade.c
@@ -149,6 +149,7 @@ pkg_infodb_link_multiarch_files(void)
}
pop_cleanup(ehflag_normaltidy); /* closedir */
+ varbuf_destroy(&pkgname);
varbuf_destroy(&newname);
varbuf_destroy(&oldname);
}
diff --git a/src/verify.c b/src/verify.c
index e2d0872..34e5379 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -133,6 +133,8 @@ verify_package(struct pkginfo *pkg)
if (failures)
verify_output(fnn, &checks);
}
+
+ varbuf_destroy(&filename);
}
int
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list