drm/i915: fix EDID memory leak in SDVO
authorJani Nikula <jani.nikula@intel.com>
Wed, 15 Aug 2012 09:32:36 +0000 (09:32 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Aug 2012 23:37:03 +0000 (09:37 +1000)
The EDID returned by drm_get_edid() was never freed.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/intel_sdvo.c

index f3762f8..5fb425b 100644 (file)
@@ -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;
 }