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

Commit b8985b79 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix double-free in AssetAtlas Bug #8833153"

parents b95c001f d5207b2e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -39,13 +39,17 @@ void AssetAtlas::init(sp<GraphicBuffer> buffer, int* map, int count) {

        createEntries(map, count);
    } else {
        ALOGW("Could not create atlas image");

        delete mImage;
        mImage = NULL;
    }
}

void AssetAtlas::terminate() {
    if (mImage) {
        delete mImage;
        mImage = NULL;

        for (size_t i = 0; i < mEntries.size(); i++) {
            delete mEntries.valueAt(i);