From owner-svn-src-stable-9@FreeBSD.ORG Sat Feb 8 08:50:45 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 930BDFAC; Sat, 8 Feb 2014 08:50:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF05181D; Sat, 8 Feb 2014 08:50:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s188ojir087201; Sat, 8 Feb 2014 08:50:45 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s188ojNL087200; Sat, 8 Feb 2014 08:50:45 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402080850.s188ojNL087200@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sat, 8 Feb 2014 08:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261624 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Feb 2014 08:50:45 -0000 Author: dumbbell Date: Sat Feb 8 08:50:44 2014 New Revision: 261624 URL: http://svnweb.freebsd.org/changeset/base/261624 Log: MFC r248061: Import Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070 Author: Sascha Hauer Date: Wed Feb 1 11:38:22 2012 +0100 drm drm_fb_helper: destroy modes drm_setup_crtcs allocated modes using drm_mode_duplicate. Free them in drm_fb_helper_crtc_free. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie Discussed with: Konstantin Belousov (kib@) Modified: stable/9/sys/dev/drm2/drm_fb_helper.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- stable/9/sys/dev/drm2/drm_fb_helper.c Sat Feb 8 08:16:38 2014 (r261623) +++ stable/9/sys/dev/drm2/drm_fb_helper.c Sat Feb 8 08:50:44 2014 (r261624) @@ -555,8 +555,11 @@ static void drm_fb_helper_crtc_free(stru for (i = 0; i < helper->connector_count; i++) free(helper->connector_info[i], DRM_MEM_KMS); free(helper->connector_info, DRM_MEM_KMS); - for (i = 0; i < helper->crtc_count; i++) + for (i = 0; i < helper->crtc_count; i++) { free(helper->crtc_info[i].mode_set.connectors, DRM_MEM_KMS); + if (helper->crtc_info[i].mode_set.mode) + drm_mode_destroy(helper->dev, helper->crtc_info[i].mode_set.mode); + } free(helper->crtc_info, DRM_MEM_KMS); }