summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_g2d.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-23 07:41:59 +0400
committerInki Dae <inki.dae@samsung.com>2012-12-05 09:39:21 +0400
commitdf3d90e5f3f09e5bc940250e2a90a7e15343a4b6 (patch)
tree159211f2b33e770d2f0d1cd6e45799085c23abc7 /drivers/gpu/drm/exynos/exynos_drm_g2d.c
parentdc625537f7d4301a7e3f6a8476bd624b09508488 (diff)
downloadlinux-df3d90e5f3f09e5bc940250e2a90a7e15343a4b6.tar.xz
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/drm/exynos/exynos_drm_g2d.c')
-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;
}