Shivakumar Malke 649a47d850 msm: camera: memmgr: fix null-ptr-deref in mem_mgr_deinit
In low memory condition, cam_mem_mgr_init can fail after
cam_mem_mgr_state is set to initialize. Since the state is
initialized, subsequent init call return success without
initializing the mem table. So, when cam_mem_mgr_deinit is
called, writing to tbl.bitmap will cause a null ptr derefernce.

This change fixes this issue by setting cam_mem_state to
uninitialize when cam_mem_mgr_init fails.

CRs-Fixed: 3671639
Change-Id: Ie3554bcbbfe10320e5278650c4dd912edd568a10
Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
(cherry picked from commit c655b11b9c6d413748d339ad735837d868b85976)
2024-01-03 22:41:11 -08:00
Description
No description provided
184 MiB
Languages
C 98.7%
C++ 0.9%
Makefile 0.3%
Starlark 0.1%