drm/ast: fix EDID memory leak
authorJani Nikula <jani.nikula@intel.com>
Wed, 15 Aug 2012 09:32:37 +0000 (09:32 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Aug 2012 23:37:09 +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/ast/ast_mode.c

index 7282c081fb53000397346d6c34879c06f940a4bd..866e9d48b2d45679d7a6e55447d6f530b1cfd536 100644 (file)
@@ -737,6 +737,7 @@ static int ast_get_modes(struct drm_connector *connector)
        if (edid) {
                drm_mode_connector_update_edid_property(&ast_connector->base, edid);
                ret = drm_add_edid_modes(connector, edid);
+               kfree(edid);
                return ret;
        } else
                drm_mode_connector_update_edid_property(&ast_connector->base, NULL);