summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
diff options
context:
space:
mode:
authorKenny Root <kroot@android.com>2012-11-14 09:33:48 -0800
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-11-14 09:33:49 -0800
commitbe37b5fa2473fd6ee5c1223472b29f212067761d (patch)
tree2851c12021634f4f512bf4f7dac0ed68dcceda05 /libs/androidfw
parent87ed0a10f5cb563c0a06d22a40472b4e88348e9b (diff)
parenta1d82ff39315c962fbd6839f7a581ffaafe675e4 (diff)
downloadframeworks_base-be37b5fa2473fd6ee5c1223472b29f212067761d.zip
frameworks_base-be37b5fa2473fd6ee5c1223472b29f212067761d.tar.gz
frameworks_base-be37b5fa2473fd6ee5c1223472b29f212067761d.tar.bz2
Merge "Free resources in correct order in ResStringPool::uninit"
Diffstat (limited to 'libs/androidfw')
-rw-r--r--libs/androidfw/ResourceTypes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 46ac886..fc2cd9e 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -506,10 +506,6 @@ status_t ResStringPool::getError() const
void ResStringPool::uninit()
{
mError = NO_INIT;
- if (mOwnedData) {
- free(mOwnedData);
- mOwnedData = NULL;
- }
if (mHeader != NULL && mCache != NULL) {
for (size_t x = 0; x < mHeader->stringCount; x++) {
if (mCache[x] != NULL) {
@@ -520,6 +516,10 @@ void ResStringPool::uninit()
free(mCache);
mCache = NULL;
}
+ if (mOwnedData) {
+ free(mOwnedData);
+ mOwnedData = NULL;
+ }
}
/**