From: David Kalnischkies Date: Fri, 11 Sep 2015 19:15:52 +0000 (+0200) Subject: fix alloc-dealloc-mismatch (operator new [] vs operator delete) X-Git-Tag: 1.1.exp13~19 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/93a0805bc9afd556e625fb90e98e690b1a847ed4 fix alloc-dealloc-mismatch (operator new [] vs operator delete) Reported-By: gcc -fsanitize=address -fno-sanitize=vptr Git-Dch: Ignore --- diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index de63c1aa8..9cbb3fbd2 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -416,7 +416,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) // to do anything at all for (DepIterator Cur = Start; true; ++Cur) { - std::unique_ptr VList(Cur.AllTargets()); + std::unique_ptr VList(Cur.AllTargets()); for (Version **I = VList.get(); *I != 0; ++I) { @@ -466,7 +466,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) // probably due to loops. for (DepIterator Cur = Start; true; ++Cur) { - std::unique_ptr VList(Cur.AllTargets()); + std::unique_ptr VList(Cur.AllTargets()); for (Version **I = VList.get(); *I != 0; ++I) { @@ -541,7 +541,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth) // Search for dependencies which are unpacked but aren't configured yet (maybe loops) for (DepIterator Cur = Start; true; ++Cur) { - std::unique_ptr VList(Cur.AllTargets()); + std::unique_ptr VList(Cur.AllTargets()); for (Version **I = VList.get(); *I != 0; ++I) { @@ -760,7 +760,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c // Look for easy targets: packages that are already okay for (DepIterator Cur = Start; Bad == true; ++Cur) { - std::unique_ptr VList(Cur.AllTargets()); + std::unique_ptr VList(Cur.AllTargets()); for (Version **I = VList.get(); *I != 0; ++I) { VerIterator Ver(Cache,*I);