drm/exynos: Fix potential NULL pointer dereference

Pointer was being dereferenced after freeing.

Fixes the following error:
drivers/gpu/drm/exynos/exynos_drm_g2d.c:323 g2d_userptr_put_dma_addr() error:
dereferencing freed memory 'g2d_userptr'

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
This commit is contained in:
Sachin Kamat 2012-11-23 09:11:59 +05:30 committed by Inki Dae
parent dc625537f7
commit df3d90e5f3
1 changed files with 1 additions and 1 deletions

View File

@ -319,8 +319,8 @@ out:
g2d_userptr->sgt = NULL;
kfree(g2d_userptr->pages);
kfree(g2d_userptr);
g2d_userptr->pages = NULL;
kfree(g2d_userptr);
g2d_userptr = NULL;
}