drm/edid: drm modes have to be free with drm_mode_destroy
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 1 Feb 2012 10:38:21 +0000 (11:38 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 3 Feb 2012 09:50:08 +0000 (09:50 +0000)
to add the missing drm_mode_object_put for that mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_edid.c

index 54a4efa0eef7f9cd3ee1146d55b0129fdf74a058..7ee7be1e5ce6197c1edc21429994cd47013e53f5 100644 (file)
@@ -750,7 +750,7 @@ drm_mode_std(struct drm_connector *connector, struct edid *edid,
                 */
                mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0);
                if (drm_mode_hsync(mode) > drm_gtf2_hbreak(edid)) {
-                       kfree(mode);
+                       drm_mode_destroy(dev, mode);
                        mode = drm_gtf_mode_complex(dev, hsize, vsize,
                                                    vrefresh_rate, 0, 0,
                                                    drm_gtf2_m(edid),