]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/exynos: fix memory leak to EDID block
authorEgbert Eich <eich@suse.de>
Tue, 20 Nov 2012 09:30:16 +0000 (04:30 -0500)
committerInki Dae <inki.dae@samsung.com>
Wed, 5 Dec 2012 05:39:20 +0000 (14:39 +0900)
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@suse.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c

index c73f4387494435b7d7517c15d8b0de68352589b6..6716ecd3b3e983dfe5327d7ea1dff4b09ffa8ea8 100644 (file)
@@ -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;
        }