[PATCH] drm/exynos: fix memory leak: free EDID block

Inki Dae inki.dae at samsung.com
Tue Nov 20 19:50:23 PST 2012


Ok, I modifed the subject of your patch like below and applied.

drm/exynos: fix memory lean to EDID block


Thanks,
Inki Dae

2012/11/20 Egbert Eich <eich at suse.de>

> drm_get_edid() returns a pointer to an EDID block. The caller
> is responsible to free this pointer itself.
> Here the pointer gets assigned to the local variable raw_edid.
> Therefore it should be freed before the variable goes out of
> scope.
>
> Signed-off-by: Egbert Eich <eich at suse.de>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 2c115f8..bc87bca 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -1293,6 +1293,7 @@ static int hdmi_get_edid(void *ctx, struct
> drm_connector *connector,
>                 DRM_DEBUG_KMS("%s : width[%d] x height[%d]\n",
>                         (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"),
>                         raw_edid->width_cm, raw_edid->height_cm);
> +               kfree(raw_edid);
>         } else {
>                 return -ENODEV;
>         }
> --
> 1.7.7
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20121121/35f918d1/attachment.html>


More information about the dri-devel mailing list