video: of: display_timing: double free on error

Started by Dan Carpenter on Jul 11, 2014

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
The display_timings_release() function frees "disp" and we free it
again on the next line.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 987edf1..5c098d5 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -236,6 +236,7 @@ timingfail:
 	if (native_mode)
 		of_node_put(native_mode);
 	display_timings_release(disp);
+	disp = NULL;
 entryfail:
 	kfree(disp);
 dispfail:
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help