summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/ResourceTypes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index bab8883ef64f..0782269d7de1 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -3313,13 +3313,14 @@ struct ResTable::PackageGroup
clearBagCache();
const size_t numTypes = types.size();
for (size_t i = 0; i < numTypes; i++) {
- const TypeList& typeList = types[i];
+ TypeList& typeList = types.editItemAt(i);
const size_t numInnerTypes = typeList.size();
for (size_t j = 0; j < numInnerTypes; j++) {
if (typeList[j]->package->owner == owner) {
delete typeList[j];
}
}
+ typeList.clear();
}
const size_t N = packages.size();