msm: camera: reqmgr: Avoid freeing subdev twice
The 'l_device' pointer in __cam_req_mgr_destroy_subdev is
set to NULL after freeing but this is done on a
local copy of the variable in stack. This results in
double-free when this function is called again. To avoid
this, pass 'l_device' pointer by reference and assign it
to NULL after freeing.
CRs-Fixed: 3120468
Change-Id: If2dde5f1c702bae26a3c7a68c2f35bafcf0f7ce6
Signed-off-by:
Nirmal Abraham <quic_c_nabrah@quicinc.com>
Loading
Please register or sign in to comment