summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-12-14 20:39:38 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-12-31 09:25:45 (GMT)
commit00e9c7c7002de36dd247745c825d4663c65e0a5b (patch)
tree5486b896779976af928b741f3b57441ef6b28e37 /drivers/gpu
parentef3f4e998240c33a9a424d5c1dbb045f2b919d43 (diff)
downloadlinux-00e9c7c7002de36dd247745c825d4663c65e0a5b.tar.xz
drm: omapdrm: gem: Free the correct memory object
The GEM object free handler frees memory allocated by the driver using the pointer to the drm_gem_object instead of the pointer to the omap_gem_object that embeds it. This doesn't cause any issue in practice as the drm_gem_object is the first field of omap_gem_object, but would cause memory corruption if the structure layout changes. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 391bc73..d9ce296 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -1345,7 +1345,7 @@ void omap_gem_free_object(struct drm_gem_object *obj)
drm_gem_object_release(obj);
- kfree(obj);
+ kfree(omap_obj);
}
/* GEM buffer object constructor */