The following commit has been merged in the master branch:
commit 5abafe0fe645fc2fed5c7e36ebb5fdc2e059cdb4
Author: Guillem Jover <guil...@debian.org>
Date:   Wed May 19 06:05:01 2010 +0200

    dselect: Fix memory leak on inexistent method directory

diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index fb782dc..958eddf 100644
--- a/dselect/methparse.cc
+++ b/dselect/methparse.cc
@@ -83,7 +83,10 @@ void readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread) {
 
   dir= opendir(pathbuf);
   if (!dir) {
-    if (errno == ENOENT) return;
+    if (errno == ENOENT) {
+      delete[] pathbuf;
+      return;
+    }
     ohshite(_("unable to read `%.250s' directory for reading 
methods"),pathbuf);
   }
 

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