The following commit has been merged in the master branch:
commit 28caaffea717f5f827972c0d6d54f1750118bd82
Author: Guillem Jover <guil...@debian.org>
Date:   Wed May 19 06:04:12 2010 +0200

    dpkg-deb, dpkg-split: Fix few resource leaks

diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index ba3db7d..ee09b16 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -168,6 +168,8 @@ void extracthalf(const char *debar, const char *directory,
         *cur= '.';
         strncpy(versionbuf,infobuf,sizeof(versionbuf));
         versionbuf[sizeof(versionbuf) - 1] = '\0';
+        free(infobuf);
+
         header_done = true;
       } else if (arh.ar_name[0] == '_') {
           /* Members with `_' are noncritical, and if we don't understand them
@@ -272,6 +274,7 @@ void extracthalf(const char *debar, const char *directory,
       c1= -1;
       readfromfd= fileno(ar);
     }
+    free(ctrlarea);
   } else {
     m_pipe(p1);
     c1 = subproc_fork();
@@ -295,6 +298,7 @@ void extracthalf(const char *debar, const char *directory,
     decompress_filter(decompressor, 0, 1, _("data"));
   }
   if (readfromfd != fileno(ar)) close(readfromfd);
+  fclose(ar);
   if (taroption) close(p2[1]);
 
   if (taroption && directory) {
diff --git a/dpkg-split/join.c b/dpkg-split/join.c
index 97b6cd6..7a4e950 100644
--- a/dpkg-split/join.c
+++ b/dpkg-split/join.c
@@ -74,6 +74,7 @@ void reassemble(struct partinfo **partlist, const char 
*outputfile) {
   if (fsync(fileno(output)))
     ohshite(_("unable to sync file '%s'"), outputfile);
   if (fclose(output)) werr(outputfile);
+  free(buffer);
   printf(_("done\n"));
 }
 

-- 
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