]> git.baikalelectronics.ru Git - kernel.git/commit
drm/omap: fix use of freed memory
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Sep 2018 10:02:56 +0000 (13:02 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 2 Oct 2018 06:36:56 +0000 (09:36 +0300)
commit8fc0f55dc35084ee482d31df94888f4fee40bb8a
tree6b04acbb84eaf46f72f7507bde7e410ca1514373
parent8a3f63c53e135bd580fd19d86d4bc1757d395c21
drm/omap: fix use of freed memory

omap_connector_destroy() does:

kfree(omap_connector);
omapdss_device_put(omap_connector->output);
omapdss_device_put(omap_connector->display);

Fix this by moving the kfree after the omapdss_device_puts.

This bug was introduced in dc27a5cd6fe1ee928acbf0d66a2f12a70236be7e

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_connector.c