Browse Source

apt-pkg/contrib/configuration.cc: Fix a small memory leak in
ReadConfigFile.

Julian Andres Klode 17 years ago
parent
commit
8aea8c3f51
2 changed files with 5 additions and 0 deletions
  1. 1 0
      apt-pkg/contrib/configuration.cc
  2. 4 0
      debian/changelog

+ 1 - 0
apt-pkg/contrib/configuration.cc

@@ -521,6 +521,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
 	  F.getline(Buffer,sizeof(Buffer) / 2);
 	  F.getline(Buffer,sizeof(Buffer) / 2);
 
 
 	  Input += Buffer;
 	  Input += Buffer;
+	  delete[] Buffer;
 	}
 	}
       while (F.fail() && !F.eof());
       while (F.fail() && !F.eof());
 
 

+ 4 - 0
debian/changelog

@@ -21,6 +21,10 @@ apt (0.7.22) UNRELEASED; urgency=low
   * [ABI break] support '#' in apt.conf and /etc/apt/preferences
   * [ABI break] support '#' in apt.conf and /etc/apt/preferences
     (closes: #189866)
     (closes: #189866)
 
 
+  [ Julian Andres Klode ]
+  * apt-pkg/contrib/configuration.cc: Fix a small memory leak in
+    ReadConfigFile.
+
  -- Christian Perrier <bubulle@debian.org>  Wed, 22 Apr 2009 10:13:54 +0200
  -- Christian Perrier <bubulle@debian.org>  Wed, 22 Apr 2009 10:13:54 +0200
 
 
 apt (0.7.21) unstable; urgency=low
 apt (0.7.21) unstable; urgency=low