[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1566184395-7615-1-git-send-email-wenwen@cs.uga.edu>
Date: Sun, 18 Aug 2019 22:12:57 -0500
From: Wenwen Wang <wenwen@...uga.edu>
To: Wenwen Wang <wenwen@...uga.edu>
Cc: Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] drm/gma500: fix memory leaks
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@...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
Powered by blists - more mailing lists