mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue