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

Commit 40e0d2a9 authored by Winson's avatar Winson
Browse files

Delete pAsset* when failing to open chunk from FileAsset

Realistically this doesn't matter because FileAsset always returns
NO_ERROR. But it's worth being correct, in case that ever changes.

Bug: 112146313

Test: none necessary

Change-Id: Iaeddc77c78c93394f96b77533cf8ce30cd1dc370
parent a232a7ab
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -292,8 +292,10 @@ Asset::Asset(void)

    pAsset = new _FileAsset;
    result = pAsset->openChunk(dataMap);
    if (result != NO_ERROR)
    if (result != NO_ERROR) {
        delete pAsset;
        return NULL;
    }

    pAsset->mAccessMode = mode;
    return pAsset;