From: Eric Anholt Date: Tue, 8 Aug 2017 20:56:05 +0000 (-0700) Subject: drm/vc4: Fix leak of HDMI EDID X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5afe0e62a548a0aa7d2095a98530b68f3d2c64e6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/vc4: Fix leak of HDMI EDID We don't keep a pointer to it around anywhere, so it's our job to free it. Cc: Stefan Wahren Link: https://github.com/anholt/linux/issues/101 Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.") Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170808205605.4432-1-eric@anholt.net Reviewed-by: Daniel Vetter Tested-by: Stefan Wahren --- diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index ff09b8e2f9ee..937da8dd65b8 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -288,6 +288,7 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector) drm_mode_connector_update_edid_property(connector, edid); ret = drm_add_edid_modes(connector, edid); drm_edid_to_eld(connector, edid); + kfree(edid); return ret; }