summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-08-28 18:32:32 -0700
committerAdam Lesinski <adamlesinski@google.com>2014-08-28 18:32:32 -0700
commit7f668d03ceec1ce1732f51cfe9828e6376bbecbc (patch)
treefc6c026c372a9d8b7e32dcf81e1bf36a2d5aa3b2 /libs/androidfw
parent01abcaa295fc4eec7442a575d160b0ce2c250127 (diff)
downloadframeworks_base-7f668d03ceec1ce1732f51cfe9828e6376bbecbc.zip
frameworks_base-7f668d03ceec1ce1732f51cfe9828e6376bbecbc.tar.gz
frameworks_base-7f668d03ceec1ce1732f51cfe9828e6376bbecbc.tar.bz2
Fix memory leak in ResTable
We were basically never cleaning any of the cached bags... oops :S Bug:16683269 Change-Id: Ic0a44218f660e16fbaac8df1d61ce6f1fdb0018b
Diffstat (limited to 'libs/androidfw')
-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 3f014ef..0ee6e03 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) {