* [PATCH] video: of: fix memory leak
@ 2015-09-30 10:06 Sudip Mukherjee
2015-10-07 11:14 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2015-09-30 10:06 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: linux-kernel, linux-fbdev, Sudip Mukherjee
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>
---
drivers/video/of_display_timing.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 32d8275..8a1076b 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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: of: fix memory leak
2015-09-30 10:06 [PATCH] video: of: fix memory leak Sudip Mukherjee
@ 2015-10-07 11:14 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2015-10-07 11:14 UTC (permalink / raw)
To: Sudip Mukherjee, Jean-Christophe Plagniol-Villard
Cc: linux-kernel, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
On 30/09/15 12:54, Sudip Mukherjee wrote:
> 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>
> ---
> drivers/video/of_display_timing.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 32d8275..8a1076b 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;
> }
Thanks, queued for 4.3 fixes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-07 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 10:06 [PATCH] video: of: fix memory leak Sudip Mukherjee
2015-10-07 11:14 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).