From 77ce8f848a14baccc89a195703ffde749d04d861 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Wed, 28 Oct 2015 16:43:42 -0700 Subject: 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 --- cmds/bootanimation/BootAnimation.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'cmds') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 64208d9..20c21db 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -280,11 +280,6 @@ status_t BootAnimation::initTexture(const Animation::Frame& frame) 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 // bitmap will go out of scope when we return from this method. bitmap.lockPixels(); -- cgit v1.1