* [PATCH] drm/gma500: fix memory leaks
@ 2019-08-19 3:12 Wenwen Wang
0 siblings, 0 replies; only message in thread
From: Wenwen Wang @ 2019-08-19 3:12 UTC (permalink / raw)
To: Wenwen Wang
Cc: Patrik Jakobsson, David Airlie, Daniel Vetter, dri-devel, open list
In mdfld_dsi_output_init(), if mdfld_dsi_pkg_sender_init() fails, the
execution is directed to the 'dsi_init_err0' label. However, some
previously allocated buffers and resources are not deallocated, leading to
memory/resource leaks. To fix this issue, revise the 'dsi_init_err0' label.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
---
drivers/gpu/drm/gma500/mdfld_dsi_output.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index 03023fa..ab9e935 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -592,11 +592,10 @@ void mdfld_dsi_output_init(struct drm_device *dev,
dsi_init_err1:
/*destroy sender*/
mdfld_dsi_pkg_sender_destroy(dsi_connector->pkg_sender);
-
+dsi_init_err0:
drm_connector_cleanup(connector);
kfree(dsi_config->fixed_mode);
kfree(dsi_config);
-dsi_init_err0:
kfree(dsi_connector);
}
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-19 3:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 3:12 [PATCH] drm/gma500: fix memory leaks Wenwen Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).