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

Commit 7426ec8e authored by Greg Kaiser's avatar Greg Kaiser
Browse files

BootAnimation: Avoid memory leak in error case

If we fail preloadZip(), we release the animation prior to
returning.

Test: TreeHugger
Change-Id: I632c052ef22b2a7192b516de5726bf4e74544f7a
parent 0b975928
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1157,6 +1157,7 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn)

    parseAnimationDesc(*animation);
    if (!preloadZip(*animation)) {
        releaseAnimation(animation);
        return nullptr;
    }