summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-09-30 11:54:08 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-10-07 13:13:59 +0200
commitd663baba8b16f3097ac3fb5baf97c54970d2f1ff (patch)
tree877e4952a5499497c6d09dd11ff96def30ba35b5 /drivers/video
parentfbdev: broadsheetfb: fix memory leak (diff)
downloadlinux-d663baba8b16f3097ac3fb5baf97c54970d2f1ff.tar.xz
linux-d663baba8b16f3097ac3fb5baf97c54970d2f1ff.zip
video: of: fix memory leak
If of_parse_display_timing() fails we are printing an error message and jumping to the error path but we missed freeing "dt". Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/of_display_timing.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 32d8275e4c88..8a1076beecd3 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -210,6 +210,7 @@ struct display_timings *of_get_display_timings(struct device_node *np)
*/
pr_err("%s: error in timing %d\n",
of_node_full_name(np), disp->num_timings + 1);
+ kfree(dt);
goto timingfail;
}