Skip to content

Commit

Permalink
video: of: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sudip Mukherjee authored and Tomi Valkeinen committed Oct 7, 2015
1 parent 4d370b7 commit d663bab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/of_display_timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d663bab

Please sign in to comment.