All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: Use after free in omap_connector_destroy()
@ 2018-10-01 16:45 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-10-01 16:45 UTC (permalink / raw)
  To: Tomi Valkeinen, Laurent Pinchart; +Cc: David Airlie, kernel-janitors, dri-devel

We can free "omap_connector" until the end of the function.

Fixes: 949ea2ef3fed ("drm/omap: Don't call HPD registration operations recursively")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index 98f5ca29444a..b81302c4bf9e 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-01 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 16:45 [PATCH] drm/omap: Use after free in omap_connector_destroy() Dan Carpenter
2018-10-01 16:45 ` Dan Carpenter
2018-10-01 23:50 ` Laurent Pinchart
2018-10-01 23:50   ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.