The following commit has been merged in the master branch:
commit 7cde255c129784700ba3f08163287002cc58158c
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Mar 13 05:28:30 2010 +0100

    Revert "libdpkg: Use varbuf_detach instead of ad-hoc code"
    
    This reverts commit 77cae397a15baeca11c26aeb806b6be516e33d5f.
    
    This change introdcued two points for memory leaks, which could be
    significant, depending on the amount of calls to the functions.

diff --git a/debian/changelog b/debian/changelog
index 61b8c88..f301171 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 dpkg (1.15.6.1) UNRELEASED; urgency=low
 
-  *
+  * Fix two memory leaks introduced in 1.15.6.
 
  -- Guillem Jover <guil...@debian.org>  Sat, 13 Mar 2010 05:23:34 +0100
 
diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c
index 6af9804..7f288d8 100644
--- a/lib/dpkg/dbmodify.c
+++ b/lib/dpkg/dbmodify.c
@@ -384,6 +384,6 @@ const char *pkgadminfile(struct pkginfo *pkg, const char 
*whichfile) {
   varbufaddc(&vb,'.');
   varbufaddstr(&vb,whichfile);
   varbufaddc(&vb,0);
-  return varbuf_detach(&vb);
+  return vb.buf;
 }
 
diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index dfb9365..c523785 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -485,7 +485,7 @@ scan_word(const char **valp)
 
   *valp = p;
 
-  return varbuf_detach(&word);
+  return word.buf;
 }
 
 void

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to