From patchwork Fri Nov 9 09:19:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommi Rantala X-Patchwork-Id: 1719801 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 741023FCF7 for ; Fri, 9 Nov 2012 09:30:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C59C5A0C23 for ; Fri, 9 Nov 2012 01:30:38 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 78993A0B99 for ; Fri, 9 Nov 2012 01:24:33 -0800 (PST) Received: by mail-we0-f177.google.com with SMTP id u50so1600193wey.36 for ; Fri, 09 Nov 2012 01:24:33 -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=QyqnIKzqMGoYBQSPAkhjba88pkT0zw93pwppYUiVwaM=; b=BDlFwgaIF2a+3bmWJcdw48ZXrZaJnVPaLNU2/DjRcsRvEfxqwXIE7VIxPjR8rjzbWv CYx81yvwQ6NUtCNaXj8PKDyfw8wSBUQ2hNeATutviPYTH+7v1IPRmz8Ba2mF1aQPMLqC J/JG/kVSt6jeFrfkKpTQRnwBASCC5mE+PLlKzKME4JrEhCHUFPca6UZUxh2K0x43ykCP xhMTgdxYjZg/2kwc16N64ZE+oKAGENBSjskfyDveDBYaOAfCJr3rYuc/0/XJvDdc/WeJ n69ORiiri0Y4hQt8ScPiUh4lGuFGVMVqw7cHqroK9/cv0Q6CRNu6F61g8pqhdmHam8LV o65A== Received: by 10.180.87.74 with SMTP id v10mr1485243wiz.21.1352453073276; Fri, 09 Nov 2012 01:24:33 -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.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Nov 2012 01:24:32 -0800 (PST) From: Tommi Rantala To: David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 6/6] drm/nouveau: free memory allocated with alloc_apertures() Date: Fri, 9 Nov 2012 11:19:40 +0200 Message-Id: <1352452780-2029-7-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/nouveau/nouveau_drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 0910125..8244863 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -223,6 +223,7 @@ nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent) boot = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; #endif remove_conflicting_framebuffers(aper, "nouveaufb", boot); + kfree(aper); ret = nouveau_device_create(pdev, nouveau_name(pdev), pci_name(pdev), nouveau_config, nouveau_debug, &device);