aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSachin Kamat2012-11-23 09:11:59 +0530
committerInki Dae2012-12-05 14:39:21 +0900
commitdf3d90e5f3f09e5bc940250e2a90a7e15343a4b6 (patch)
tree159211f2b33e770d2f0d1cd6e45799085c23abc7 /drivers/gpu
parentdc625537f7d4301a7e3f6a8476bd624b09508488 (diff)
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_g2d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index c1054cb2fe06..6ffa0763c078 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -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;
}