summaryrefslogtreecommitdiff
path: root/apt-pkg/metaindex.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/metaindex.h')
-rw-r--r--apt-pkg/metaindex.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 2b87d7da9..779b6ab14 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -39,7 +39,13 @@ class metaIndex
virtual vector<pkgIndexFile *> *GetIndexFiles() = 0;
virtual bool IsTrusted() const = 0;
- virtual ~metaIndex() {};
+ virtual ~metaIndex() {
+ if (Indexes == 0)
+ return;
+ for (vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
+ delete *I;
+ delete Indexes;
+ }
};
#endif