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.
@@ -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@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.
@@ -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;