mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 04:54:41 +08:00
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 949ea2ef3f
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
08bafffe47
commit
2e65c7a6a1
@ -164,10 +164,11 @@ static void omap_connector_destroy(struct drm_connector *connector)
|
||||
|
||||
drm_connector_unregister(connector);
|
||||
drm_connector_cleanup(connector);
|
||||
kfree(omap_connector);
|
||||
|
||||
omapdss_device_put(omap_connector->output);
|
||||
omapdss_device_put(omap_connector->display);
|
||||
|
||||
kfree(omap_connector);
|
||||
}
|
||||
|
||||
#define MAX_EDID 512
|
||||
|
Loading…
Reference in New Issue
Block a user