Skip to contentSkip to conversation

video: of: display_timing: double free on error

PATCH New Dan Carpenter 1 participant 1 message Jul 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: of: display_timing: double free on error

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

drivers/video/of_display_timing.c +1 -0
index 987edf1..5c098d5 100644
@@ -236,6 +236,7 @@ timingfail:
 	if (native_mode)
 		of_node_put(native_mode);
 	display_timings_release(disp);
+	disp = NULL;
 entryfail:
 	kfree(disp);
 dispfail: