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

Commit 77ce8f84 authored by Tom Marshall's avatar Tom Marshall Committed by Gerrit Code Review
Browse files

bootanimation: Do not free frame map

The frame map is reused when needSaveMem==true, resulting in a double
free and segfault.

The only side effect would seem to be failure to cleanup all resources
at exit.  That's acceptable, as the kernel will do it anyway.

Note that in 12.1, the frame map release commit was reverted by CAF in
commit I535330edb636f9457beed0849147168eaa6ae2ec, which results in the
same behavior.

Change-Id: I4ea66dccd1f5c9d784701242fba8700bce271579
parent bbef4227
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -280,11 +280,6 @@ status_t BootAnimation::initTexture(const Animation::Frame& frame)
        delete codec;
        delete codec;
    }
    }


    // FileMap memory is never released until application exit.
    // Release it now as the texture is already loaded and the memory used for
    // the packed resource can be released.
    delete frame.map;

    // ensure we can call getPixels(). No need to call unlock, since the
    // ensure we can call getPixels(). No need to call unlock, since the
    // bitmap will go out of scope when we return from this method.
    // bitmap will go out of scope when we return from this method.
    bitmap.lockPixels();
    bitmap.lockPixels();