From patchwork Thu Jun 2 14:39:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9150513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E64716074E for ; Thu, 2 Jun 2016 14:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D841128047 for ; Thu, 2 Jun 2016 14:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD2EE28304; Thu, 2 Jun 2016 14:39:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9017428047 for ; Thu, 2 Jun 2016 14:39:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 327CA6EBF9; Thu, 2 Jun 2016 14:39:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C35E66EBE6 for ; Thu, 2 Jun 2016 14:39:21 +0000 (UTC) Received: by mail-qk0-x244.google.com with SMTP id q184so5271704qkf.0 for ; Thu, 02 Jun 2016 07:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j6JH4Ln3BKZJ8ZSIHTHAyCdVwkNTyn/Fv24hqy4hjAE=; b=SYMCXpG/jmfwWNITbirIT/eUWMSjQB3Emji/XI/+tziNkX3qYfmtO3IdH6lnLmBouX 2xcbqRub4+rllldpuSzxhP9G+pYeJADM9z482/FjWDLFUtlcf8wZorce0hCuStiulExV 7OGAtzRY+QVDW1kzP4ebdxrVwztOl+HzDHdMW1gZZ01Gyke8xP5fCGs7i0cQCY057SDe zoJ9u99h/3tFRmMLWKllVnG8rc3fAO69FEbCJ72VCQO3lgZoizy8siYWXCqibqFTIqU9 9K+ubFYgKS+N0RzI9X8gZoo6W1OovrjWWlHofntQzcJIPkNVC3y8nhUUj8W9ym9PJo68 AcJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j6JH4Ln3BKZJ8ZSIHTHAyCdVwkNTyn/Fv24hqy4hjAE=; b=kvbvpzNTvtEaoqgpuy6TlvFNSPk44oRgZCU+oV9KiiHW50i+PvFAPXFvRmgJRLWefO /3rFOqy8N7xyf2hrAMij6B7R2ZOKYD7KeuJl31e9b3qkCCu729WZcEVs8WWqEI2K/plS 3S1xel0aJqYwkFv+VVWQFB1bwZ0mRtGp6NZp7EcEXFkdeqDoTLQPEPJ4rwUxrmAz+rkV uMY9QiQep4oVNVFDxED3TIfqnexOtSed3VQmO/5K6Iw+JBtF//OwDUDqVvtmYi2e/qGt btvfq5FO6ciuqvNV0r2qlT8c3bQU6CIkfPgnaOxyRo+JR0iXAVPI9gsBmvONCboUu8YC 4bdQ== X-Gm-Message-State: ALyK8tLB1OKWsLzxUc6+PcSkWWMxJ65xU+iPf50PYRM7cj+67dwhOuwgbywEkcI+sSu4eQ== X-Received: by 10.55.167.133 with SMTP id q127mr21986769qke.95.1464878360630; Thu, 02 Jun 2016 07:39:20 -0700 (PDT) Received: from cm.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id 188sm220362qhf.44.2016.06.02.07.39.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2016 07:39:20 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/13] drm/amdgpu: fix mem leak in atombios Date: Thu, 2 Jun 2016 10:39:03 -0400 Message-Id: <1464878353-16836-4-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464878353-16836-1-git-send-email-alexander.deucher@amd.com> References: <1464878353-16836-1-git-send-email-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , Monk Liu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Monk Liu Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1727a4d..964f314 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -827,8 +827,10 @@ static uint32_t cail_ioreg_read(struct card_info *info, uint32_t reg) */ static void amdgpu_atombios_fini(struct amdgpu_device *adev) { - if (adev->mode_info.atom_context) + if (adev->mode_info.atom_context) { kfree(adev->mode_info.atom_context->scratch); + kfree(adev->mode_info.atom_context->iio); + } kfree(adev->mode_info.atom_context); adev->mode_info.atom_context = NULL; kfree(adev->mode_info.atom_card_info);