From patchwork Wed Aug 15 09:32:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 1325431 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id AD3EDDFFED for ; Wed, 15 Aug 2012 12:26:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6F7AA0C25 for ; Wed, 15 Aug 2012 05:26:50 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id AF406A0A59 for ; Wed, 15 Aug 2012 02:32:57 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 15 Aug 2012 02:32:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.77,772,1336374000"; d="scan'208";a="201476227" Received: from unknown (HELO localhost) ([10.255.12.250]) by fmsmga001.fm.intel.com with ESMTP; 15 Aug 2012 02:32:54 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org, linux@arm.linux.org.uk, daniel@ffwll.ch, airlied@linux.ie Subject: [PATCH 2/4] drm/ast: fix EDID memory leak Date: Wed, 15 Aug 2012 12:32:37 +0300 Message-Id: <30c9289fefa52cbb189df0fb1edcf93bed990484.1345022231.git.jani.nikula@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Wed, 15 Aug 2012 05:25:40 -0700 Cc: jani.nikula@intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org The EDID returned by drm_get_edid() was never freed. Signed-off-by: Jani Nikula --- drivers/gpu/drm/ast/ast_mode.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 7282c08..866e9d4 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -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);