]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexfile.cc
Fix double free (closes: #711045)
[apt.git] / apt-pkg / indexfile.cc
index b56d9dc6c63a87abe90202cb43920988d68899eb..642a750d41d201835e68aa59b5338353da2e373a 100644 (file)
@@ -29,7 +29,8 @@ unsigned long pkgIndexFile::Type::GlobalListLen = 0;
 pkgIndexFile::Type::Type()
 {
    ItmList[GlobalListLen] = this;
-   GlobalListLen++;   
+   GlobalListLen++;
+   Label = NULL;
 }
                                                                        /*}}}*/
 // Type::GetType - Locate the type by name                             /*{{{*/
@@ -46,9 +47,9 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type)
 // IndexFile::ArchiveInfo - Stub                                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
+std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
 {
-   return string();
+   return std::string();
 }
                                                                        /*}}}*/
 // IndexFile::FindInCache - Stub                                       /*{{{*/
@@ -62,10 +63,10 @@ pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
 // IndexFile::SourceIndex - Stub                                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
+std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
                                pkgSrcRecords::File const &File) const
 {
-   return string();
+   return std::string();
 }
                                                                        /*}}}*/
 // IndexFile::TranslationsAvailable - Check if will use Translation    /*{{{*/
@@ -97,7 +98,7 @@ __attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *La
 /* As we have now possibly more than one LanguageCode this method is
    supersided by a) private classmembers or b) getLanguages().
    TODO: Remove method with next API break */
-__attribute__ ((deprecated)) string pkgIndexFile::LanguageCode() {
+__attribute__ ((deprecated)) std::string pkgIndexFile::LanguageCode() {
        if (TranslationsAvailable() == false)
                return "";
        return APT::Configuration::getLanguages()[0];