Explorar o código

* apt-pkg/algorithms.cc:
- fix memory leak of Flags in pkgSimulate by a proper destructor

Marius Vollmer %!s(int64=14) %!d(string=hai) anos
pai
achega
b270388bef
Modificáronse 3 ficheiros con 11 adicións e 0 borrados
  1. 6 0
      apt-pkg/algorithms.cc
  2. 1 0
      apt-pkg/algorithms.h
  3. 4 0
      debian/changelog

+ 6 - 0
apt-pkg/algorithms.cc

@@ -58,6 +58,12 @@ pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache),
       FileNames[I] = Jnk;
       FileNames[I] = Jnk;
 }
 }
 									/*}}}*/
 									/*}}}*/
+// Simulate::~Simulate - Destructor					/*{{{*/
+pkgSimulate::~pkgSimulate()
+{
+   delete[] Flags;
+}
+									/*}}}*/
 // Simulate::Describe - Describe a package				/*{{{*/
 // Simulate::Describe - Describe a package				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Parameter Current == true displays the current package version,
 /* Parameter Current == true displays the current package version,

+ 1 - 0
apt-pkg/algorithms.h

@@ -78,6 +78,7 @@ private:
    public:
    public:
 
 
    pkgSimulate(pkgDepCache *Cache);
    pkgSimulate(pkgDepCache *Cache);
+   ~pkgSimulate();
 };
 };
 									/*}}}*/
 									/*}}}*/
 class pkgProblemResolver						/*{{{*/
 class pkgProblemResolver						/*{{{*/

+ 4 - 0
debian/changelog

@@ -32,6 +32,10 @@ apt (0.9.4) UNRELEASED; urgency=low
     - generate an equal sign also for the first arch (Closes: #669142)
     - generate an equal sign also for the first arch (Closes: #669142)
 
 
 
 
+  [ Marius Vollmer ]
+  * apt-pkg/algorithms.cc:
+    - fix memory leak of Flags in pkgSimulate by a proper destructor
+
  -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 11 May 2012 23:26:59 +0200
  -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 11 May 2012 23:26:59 +0200
 
 
 apt (0.9.3) unstable; urgency=low
 apt (0.9.3) unstable; urgency=low