summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-11 21:15:52 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commit93a0805bc9afd556e625fb90e98e690b1a847ed4 (patch)
tree42486572b3c24ce1355062593a8968e5d89bcb44 /apt-pkg/packagemanager.cc
parent830a1b8c9e9a26dc1101167ac66a75c444902c4d (diff)
fix alloc-dealloc-mismatch (operator new [] vs operator delete)
Reported-By: gcc -fsanitize=address -fno-sanitize=vptr Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc8
1 files changed, 4 insertions, 4 deletions
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<Version *> VList(Cur.AllTargets());
+ std::unique_ptr<Version *[]> 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<Version *> VList(Cur.AllTargets());
+ std::unique_ptr<Version *[]> 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<Version *> VList(Cur.AllTargets());
+ std::unique_ptr<Version *[]> 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<Version *> VList(Cur.AllTargets());
+ std::unique_ptr<Version *[]> VList(Cur.AllTargets());
for (Version **I = VList.get(); *I != 0; ++I)
{
VerIterator Ver(Cache,*I);