ion: msm: Only check heap IDs if the heap has been initialized
The get_ion_heap() code blindly checks heap IDs in the array
of heap pointers without checking to see if the heap pointer
is valid, which can cause a NULL pointer to be dereferenced.
Add a check before inspecting the heap ID to ensure that the
heap pointer is valid.
Change-Id: I2ecdc652460878446e3f2daa2379e04ac021d75c
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment