[Reproducible-commits] [dpkg] 23/63: dpkg: Fix memory leak when unpacking conffiles
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Mar 4 17:44:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/buildinfo
in repository dpkg.
commit 4b86f722f1a147580c365f2fcd33606644fc565b
Author: Guillem Jover <guillem at debian.org>
Date: Thu Feb 18 17:55:23 2016 +0100
dpkg: Fix memory leak when unpacking conffiles
We keep a queue of conffile filenodenames, and never free it. We should
be using instead the obstack allocator, so that when we are done with
this package the list entries get all released at the same time.
---
debian/changelog | 1 +
src/archives.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index ebc071b..919ecf1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
* Add source format backend-specific --help options support to dpkg-source.
* Add MIPS R6 architectures to arch tables. Closes: #807340
Thanks to YunQiang Su <wzssyqa at gmail.com>.
+ * Fix memory leak when unpacking conffiles.
* Portability:
- Move DPKG_ADMINDIR environment variable name out from update-alternatives
code, to make life easier for non-dpkg-based systems.
diff --git a/src/archives.c b/src/archives.c
index 4b21270..92f7def 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1655,7 +1655,7 @@ filenamenode_queue_push(struct filenamenode_queue *queue,
{
struct fileinlist *node;
- node = m_malloc(sizeof(*node));
+ node = tar_pool_alloc(sizeof(*node));
node->next = NULL;
node->namenode = namenode;
--
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