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 c60460043e24dc5f0e19107dd1fe64c25a0da515..4ff62a517c755e6e0e4e34a4a63c0e13fa4abd51 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);
        }
 }