drm/imx: imx-ldb: fix channel->edid memleak
authorPeter Seiderer <ps.report@gmx.net>
Sun, 8 Dec 2013 21:03:57 +0000 (22:03 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 6 Jan 2015 16:36:13 +0000 (17:36 +0100)
If edid was allocated during bind, it must be freed again during unbind.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/imx-ldb.c

index c604600..4ff62a5 100644 (file)
@@ -574,6 +574,8 @@ static void imx_ldb_unbind(struct device *dev, struct device *master,
 
                channel->connector.funcs->destroy(&channel->connector);
                channel->encoder.funcs->destroy(&channel->encoder);
+
+               kfree(channel->edid);
        }
 }