Fix memory leak in ResTable

We were basically never cleaning any of the
cached bags... oops :S

Bug:16683269
Change-Id: Ic0a44218f660e16fbaac8df1d61ce6f1fdb0018b
This commit is contained in:
Adam Lesinski
2014-08-28 18:32:32 -07:00
parent 01abcaa295
commit 7f668d03ce

View File

@@ -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) {