Просмотр исходного кода

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

Julian Andres Klode лет назад: 17
Родитель
Сommit
8aea8c3f51
2 измененных файлов с 5 добавлено и 0 удалено
  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);
 
 	  Input += Buffer;
+	  delete[] Buffer;
 	}
       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
     (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
 
 apt (0.7.21) unstable; urgency=low