Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a9f874c authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am e2a2fe4e: am be37b5fa: Merge "Free resources in correct order in ResStringPool::uninit"

* commit 'e2a2fe4e':
  Free resources in correct order in ResStringPool::uninit
parents dbdcebdb e2a2fe4e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
    }
}

/**