From patchwork Fri Nov 9 09:19:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommi Rantala X-Patchwork-Id: 1719771 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 4249D3FCF7 for ; Fri, 9 Nov 2012 09:28:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16B5CA0C27 for ; Fri, 9 Nov 2012 01:28:06 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id A1EDBA0B9A for ; Fri, 9 Nov 2012 01:24:30 -0800 (PST) Received: by mail-wg0-f43.google.com with SMTP id dq11so1809631wgb.12 for ; Fri, 09 Nov 2012 01:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=DWNaQStWamg0tC6nvW/1j/cWsQWq40cef3iz3Sw22wk=; b=IjkWva1liCc6j2HN0he4sBo2GHTUy9BtBnNbvQGTgfKaSX/kcDAe4MDU8E7MaD+Hp4 D8Z6Dfd7R310GoOdcX0crIAdZgCWBLoDz2xjv2sDt75EvlIDzcxJ9+zaUZsPs2MQELc7 eupKzjX13B0t/4tGjztclPJun3wXgrEqVYkgmxf5etxzOP5AjZEnVYisZsDYKYmiZz+F iNHaiyVwcCOHySc/AoLxb3LQ2cqd1MHE1KrII/zAiF8ia847kEUMw6LVfk0aMT3EDJ9u 2pX8WpiqLB2BF+SYzSGUute9hXkjlIf/QJ4xNyp5v+/V63jKngKwVpYPT1YbKcJNTs6n O6Sg== Received: by 10.180.107.136 with SMTP id hc8mr1518484wib.9.1352453070327; Fri, 09 Nov 2012 01:24:30 -0800 (PST) Received: from localhost.localdomain (espcolo-webproxy02.nokia.com. [192.100.120.42]) by mx.google.com with ESMTPS id r10sm1560293wiz.0.2012.11.09.01.24.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Nov 2012 01:24:29 -0800 (PST) From: Tommi Rantala To: David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm/mgag200: free memory allocated with alloc_apertures() Date: Fri, 9 Nov 2012 11:19:37 +0200 Message-Id: <1352452780-2029-4-git-send-email-tt.rantala@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352452780-2029-1-git-send-email-tt.rantala@gmail.com> References: <1352452780-2029-1-git-send-email-tt.rantala@gmail.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 Fix a memory leak by deallocating the memory we got from alloc_apertures(). Signed-off-by: Tommi Rantala --- drivers/gpu/drm/mgag200/mgag200_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index 07d4b24..857d71b 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -145,6 +145,7 @@ static int mga_vram_init(struct mga_device *mdev) aper->count = 1; remove_conflicting_framebuffers(aper, "mgafb", true); + kfree(aper); if (!request_mem_region(mdev->mc.vram_base, mdev->mc.vram_window, "mgadrmfb_vram")) {