diff mbox

[1/4] drm/i915: fix EDID memory leak in SDVO

Message ID 738a7ab23d49f3fb68cc67062eaa57ed6c8d23c7.1345022231.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Aug. 15, 2012, 9:32 a.m. UTC
The EDID returned by drm_get_edid() was never freed.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Daniel Vetter Aug. 15, 2012, 10:45 p.m. UTC | #1
On Wed, Aug 15, 2012 at 12:32:36PM +0300, Jani Nikula wrote:
> The EDID returned by drm_get_edid() was never freed.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Picked up for -fixes, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index d172e98..d81bb0b 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1692,6 +1692,7 @@  static bool intel_sdvo_detect_hdmi_audio(struct drm_connector *connector)
 	edid = intel_sdvo_get_edid(connector);
 	if (edid != NULL && edid->input & DRM_EDID_INPUT_DIGITAL)
 		has_audio = drm_detect_monitor_audio(edid);
+	kfree(edid);
 
 	return has_audio;
 }