Просмотр исходного кода

Back out fix for now; not sure I want to bump the lib v...
Author: mdz
Date: 2003-09-02 04:52:16 GMT
Back out fix for now; not sure I want to bump the lib version yet

Arch Librarian лет назад: 22
Родитель
Сommit
f50d1cfa66
2 измененных файлов с 2 добавлено и 8 удалено
  1. 2 6
      apt-pkg/pkgrecords.cc
  2. 0 2
      debian/changelog

+ 2 - 6
apt-pkg/pkgrecords.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: pkgrecords.cc,v 1.7 2003/09/02 04:46:18 mdz Exp $
+// $Id: pkgrecords.cc,v 1.8 2003/09/02 04:52:16 mdz Exp $
 /* ######################################################################
    
    Package Records - Allows access to complete package description records
@@ -42,10 +42,6 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
       if (Files[I->ID] == 0)
 	 return;
    }   
-   
-   // We store this to make sure that the destructor won't segfault,
-   // even if the Cache object was destructed before this instance.
-   PackageFileCount = Cache.HeaderP->PackageFileCount;
 }
 									/*}}}*/
 // Records::~pkgRecords - Destructor					/*{{{*/
@@ -53,7 +49,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
 /* */
 pkgRecords::~pkgRecords()
 {
-   for (unsigned I = 0; I != PackageFileCount; I++)
+   for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++)
       delete Files[I];
    delete [] Files;
 }

+ 0 - 2
debian/changelog

@@ -4,8 +4,6 @@ apt (0.5.11) unstable; urgency=low
     (Closes: #208302)
   * In apt.conf(5), give the fully qualified name of Dir::Bin::Methods,
     rather than just "methods"
-  * Small bugfix to pkgRecords to prevent a segfault if the pkgCache is
-    destroyed before it (from Conectiva's apt-rpm)
 
  --