msm: kgsl: Do not double free pages in kgsl_memdesc
We have a situation where the page count value is non-zero but the
pages pointer is pointing to memory that is already freed. We then
go on to access this invalid pages pointer to free the pages that
have already been freed. We now check for the validity of the pages
pointer before attempting to free it. Also set the page count to 0
before freeing pages and set the pages pointer to NULL after freeing
pages.
Change-Id: I2b8e63a5f2ad2245f0068214b8925b147435d5db
Signed-off-by:
Raghu Ananya Arabolu <rarabolu@codeaurora.org>
Loading
Please register or sign in to comment