summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-03 18:47:32 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-01-03 18:47:32 -0800
commit767e1c010c0664fa4bf7e7e32b840af4bbe0b0cf (patch)
treebca418c2c05fcdd6ea5eb9fe3882877606155974 /libs
parentb7de79d02743cc3b5372be27be818d3227a34e2b (diff)
parent9aac0c1b35ec666a18f320be99e6aa37d0bcf202 (diff)
downloadframeworks_base-767e1c010c0664fa4bf7e7e32b840af4bbe0b0cf.zip
frameworks_base-767e1c010c0664fa4bf7e7e32b840af4bbe0b0cf.tar.gz
frameworks_base-767e1c010c0664fa4bf7e7e32b840af4bbe0b0cf.tar.bz2
am 9aac0c1b: Merge "fix potential memory leak"
* commit '9aac0c1b35ec666a18f320be99e6aa37d0bcf202': fix potential memory leak
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/ResourceTypes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index a730065..094def4 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -5038,11 +5038,14 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
} else {
group = mPackageGroups.itemAt(idx-1);
if (group == NULL) {
+ delete package;
return (mError=UNKNOWN_ERROR);
}
}
err = group->packages.add(package);
if (err < NO_ERROR) {
+ delete group;
+ delete package;
return (mError=err);
}
} else {