From patchwork Thu Jun 2 14:39:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9150509 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 490756074E for ; Thu, 2 Jun 2016 14:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AFE228047 for ; Thu, 2 Jun 2016 14:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FF5A28304; Thu, 2 Jun 2016 14:39:45 +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 DA3CA28047 for ; Thu, 2 Jun 2016 14:39:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8743F6EBEF; Thu, 2 Jun 2016 14:39:41 +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 408296E0E4 for ; Thu, 2 Jun 2016 14:39:21 +0000 (UTC) Received: by mail-qk0-x244.google.com with SMTP id q184so5271687qkf.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=91G9v7pIUs+6Q4yJwrl0IR1HYecUDExeuJ/YsUG98sc=; b=rYDRZkUgX1j30uSr+1xzS6DdHXEKWvGuShcQ6O24HxsGg0q8PEc7rbVrkL8r3ZqQuC TcS233c1luJicPVDYd1YMFgNeRHlNIB2hfU13Cm2RahkMo5sr3ZsiOVwcyVNACoIOUnp YvONs7DICt0TvPPJi6cNy85M09Q7AMCr+I9F1bEB4glNgGd577RAOG1XORo/wzat5Wid U6w0R7yn1ooqvoqGzzLGw+6Lc/OmmmVmWh/gC6uqarLXNH1xPQJkTvyVv9mJkUNXUACl QADiY3Gt3de0xOgK9DyTsilxt3ABCWk5C1mTjXEclJHIyVSYSK+YK8g7Tx7wal5FQXj9 +fYw== 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=91G9v7pIUs+6Q4yJwrl0IR1HYecUDExeuJ/YsUG98sc=; b=kVFZl0lluMuqUaV9VroPiaElTUh3jVrTfmuVEB/waROGmsH+EnwYicJ+w/4ZTndYpC O3aWSm+07DPoaDT6cek1I0tVc5rBttQjRyQOFMsL1CuXCzu1RoQ/EqeQdhqviR2X9y6V vLuWlp/PwZdYAJTBn76RO34979bDFsUn7LAZkS3MMQVfhl8N6GIOzNU8Fi62+WEAwnA2 OpAY25KCeJZSaI6jzl5KpwLBHY07Pavpa0olGYT/jAqmstuQYoqX1CXDh0dzGrJ3QWt+ KYDyXhcaRN67NWyuRsutRt9U6Hk2/mwUqqIE1nPRlfnOX/Pr2YyYyn9ZHU81UFgXFfNF EMLQ== X-Gm-Message-State: ALyK8tKLQt0CSfJpxar8Ta6USW2D24HJ5NPGW0zEYgxRtvihJI+s6yyGStO+It/qV6hDfw== X-Received: by 10.55.26.219 with SMTP id l88mr39747832qkh.14.1464878360054; 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.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2016 07:39:19 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 02/13] drm/amdgpu: fix mem leak in pplib/hwmgr Date: Thu, 2 Jun 2016 10:39:02 -0400 Message-Id: <1464878353-16836-3-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/powerplay/hwmgr/hwmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 1c48917..910d56d 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c @@ -93,6 +93,13 @@ int hwmgr_fini(struct pp_hwmgr *hwmgr) if (hwmgr == NULL || hwmgr->ps == NULL) return -EINVAL; + /* do hwmgr finish*/ + kfree(hwmgr->backend); + + kfree(hwmgr->start_thermal_controller.function_list); + + kfree(hwmgr->set_temperature_range.function_list); + kfree(hwmgr->ps); kfree(hwmgr); return 0;