diff options
| author | 2012-11-14 09:43:06 -0800 | |
|---|---|---|
| committer | 2012-11-14 09:43:06 -0800 | |
| commit | e2a2fe4ef3695baf3c7dca1637373ebd968a4704 (patch) | |
| tree | c64f4c5e8c5bfe1330d5748afb4f0d7b975def05 | |
| parent | eacbc280e39c3e0e3ec67ccff640870d02e22dae (diff) | |
| parent | be37b5fa2473fd6ee5c1223472b29f212067761d (diff) | |
am be37b5fa: Merge "Free resources in correct order in ResStringPool::uninit"
* commit 'be37b5fa2473fd6ee5c1223472b29f212067761d':
Free resources in correct order in ResStringPool::uninit
| -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; + } } /** |