diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-14 16:11:35 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-14 16:11:35 +0200 |
| commit | dc6cdb234d24cbcc0cb9e5c93c01ac63898c3e40 (patch) | |
| tree | 5b75094132e6247f56a59c838a13564f31ac696a /python/cache.cc | |
| parent | 9a968fbe949fc6f13a8a7074197156f3682b7682 (diff) | |
| download | python-apt-dc6cdb234d24cbcc0cb9e5c93c01ac63898c3e40.tar.gz | |
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.
Diffstat (limited to 'python/cache.cc')
| -rw-r--r-- | python/cache.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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<pkgCache*>(Self); pkgCacheFile *CacheF = GetCpp<pkgCacheFile*>(CacheFilePy); CacheF->Close(); - CppOwnedDeallocPtr<pkgCache *>(Self); + // Do not delete the pointer here, because it has already been deleted by + // closing the cache file. + CppOwnedDealloc<pkgCache *>(Self); } static PyObject *PkgCacheNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) |
