[Intel-gfx] [PATCH ]drm/i915: avoid potential edid memory issue.

Ma Ling ling.ma at intel.com
Wed Mar 11 11:18:29 CET 2009


drm_get_edid will store edid into raw_edid, so when freeing edid memory,
at the same time clean raw_edid pointer. 

Signed-off-by: Ma Ling <ling.ma at intel.com>
---
 drivers/gpu/drm/i915/intel_modes.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index e42019e..07d7ec9 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -76,6 +76,7 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
 		drm_mode_connector_update_edid_property(&intel_output->base,
 							edid);
 		ret = drm_add_edid_modes(&intel_output->base, edid);
+		intel_output->base.display_info.raw_edid = NULL;
 		kfree(edid);
 	}
 
-- 
1.5.4.4






More information about the Intel-gfx mailing list