From b270388bef045df8c1b364338f545791bba222c1 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Tue, 15 May 2012 21:17:08 +0200 Subject: * apt-pkg/algorithms.cc: - fix memory leak of Flags in pkgSimulate by a proper destructor --- apt-pkg/algorithms.cc | 6 ++++++ apt-pkg/algorithms.h | 1 + debian/changelog | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index e7b359981..2d710097a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -58,6 +58,12 @@ pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache), FileNames[I] = Jnk; } /*}}}*/ +// Simulate::~Simulate - Destructor /*{{{*/ +pkgSimulate::~pkgSimulate() +{ + delete[] Flags; +} + /*}}}*/ // Simulate::Describe - Describe a package /*{{{*/ // --------------------------------------------------------------------- /* Parameter Current == true displays the current package version, diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 076542c20..aff8a68f2 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -78,6 +78,7 @@ private: public: pkgSimulate(pkgDepCache *Cache); + ~pkgSimulate(); }; /*}}}*/ class pkgProblemResolver /*{{{*/ diff --git a/debian/changelog b/debian/changelog index dd8ca72cd..e451bf755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,10 @@ apt (0.9.4) UNRELEASED; urgency=low - 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 Fri, 11 May 2012 23:26:59 +0200 apt (0.9.3) unstable; urgency=low -- cgit v1.2.3