From dc6cdb234d24cbcc0cb9e5c93c01ac63898c3e40 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 14 Jun 2009 16:11:35 +0200 Subject: python/cache.cc,depcache.cc: Do not delete the depcache and cache pointers. Deleting the pointers caused a crash because those pointers will also be deleted by closing the cache file. --- python/cache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/cache.cc') diff --git a/python/cache.cc b/python/cache.cc index 22ed9ecc..80a7a8a5 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -247,7 +247,9 @@ void PkgCacheFileDealloc(PyObject *Self) PyObject *CacheFilePy = GetOwner(Self); pkgCacheFile *CacheF = GetCpp(CacheFilePy); CacheF->Close(); - CppOwnedDeallocPtr(Self); + // Do not delete the pointer here, because it has already been deleted by + // closing the cache file. + CppOwnedDealloc(Self); } static PyObject *PkgCacheNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) -- cgit v1.2.3