From: Sudip Mukherjee Date: Wed, 30 Sep 2015 09:54:08 +0000 (+0530) Subject: video: of: fix memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d663baba8b16f3097ac3fb5baf97c54970d2f1ff;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Tomi Valkeinen --- 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; }