summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Lesinski <adamlesinski@google.com> 2014-08-28 18:32:32 -0700
committer Adam Lesinski <adamlesinski@google.com> 2014-08-28 18:32:32 -0700
commit7f668d03ceec1ce1732f51cfe9828e6376bbecbc (patch)
treefc6c026c372a9d8b7e32dcf81e1bf36a2d5aa3b2
parent01abcaa295fc4eec7442a575d160b0ce2c250127 (diff)
Fix memory leak in ResTable
We were basically never cleaning any of the cached bags... oops :S Bug:16683269 Change-Id: Ic0a44218f660e16fbaac8df1d61ce6f1fdb0018b
-rw-r--r--libs/androidfw/ResourceTypes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 3f014ef5de1e..0ee6e03d3dcc 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -2939,7 +2939,7 @@ struct ResTable::PackageGroup
for (size_t i = 0; i < bags->size(); i++) {
TABLE_NOISY(printf("type=%d\n", i));
const TypeList& typeList = types[i];
- if (typeList.isEmpty()) {
+ if (!typeList.isEmpty()) {
bag_set** typeBags = bags->get(i);
TABLE_NOISY(printf("typeBags=%p\n", typeBags));
if (typeBags) {