X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/809aa216c630f1cc61b0c3b9d992d4a3be14be3c..7f97aa748270231d63b6419a271ba74029eebcd3:/apt-pkg/policy.cc diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 76c36b71b..4711372bc 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -100,8 +100,8 @@ bool pkgPolicy::InitDefaults() } // Apply the defaults.. - SPtrArray Fixed = new bool[Cache->HeaderP->PackageFileCount]; - memset(Fixed,0,sizeof(*Fixed)*Cache->HeaderP->PackageFileCount); + std::unique_ptr Fixed(new bool[Cache->HeaderP->PackageFileCount]); + memset(Fixed.get(),0,sizeof(Fixed[0])*Cache->HeaderP->PackageFileCount); StatusOverride = false; for (vector::const_iterator I = Defaults.begin(); I != Defaults.end(); ++I) {