summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 46ac8860a639..fc2cd9ead498 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;
+ }
}
/**