msm: kgsl: Do not fail after drawobj is added to context queue
After a drawobj is added to context drawqueue, if kmem_cache_alloc
fails, we destroy the drawobj. This could lead to use-after-free if
the context gets detached and drawobj is already destroyed meanwhile.
Avoid this by doing allocation before the drawobj is added to the queue.
Change-Id: I6d1f989b7795669f85756284db790f00f5fc2b9f
Signed-off-by:
Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Loading
Please register or sign in to comment