Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sudip Mukherjee and committed by
Tomi Valkeinen
d663baba 4d370b74

+1
+1
drivers/video/of_display_timing.c
··· 210 210 */ 211 211 pr_err("%s: error in timing %d\n", 212 212 of_node_full_name(np), disp->num_timings + 1); 213 + kfree(dt); 213 214 goto timingfail; 214 215 } 215 216