diff options
| author | 2012-11-14 09:33:48 -0800 | |
|---|---|---|
| committer | 2012-11-14 09:33:49 -0800 | |
| commit | be37b5fa2473fd6ee5c1223472b29f212067761d (patch) | |
| tree | 2851c12021634f4f512bf4f7dac0ed68dcceda05 /libs | |
| parent | 87ed0a10f5cb563c0a06d22a40472b4e88348e9b (diff) | |
| parent | a1d82ff39315c962fbd6839f7a581ffaafe675e4 (diff) | |
Merge "Free resources in correct order in ResStringPool::uninit"
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/androidfw/ResourceTypes.cpp | 8 |
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; + } } /** |