Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp621981ybp; Wed, 9 Oct 2019 01:21:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz04CiLHD9MGFoeYIsZdQkZW7kLJh5M3FEyCgtXpaD73DgXjOtgpyTBqRJnyxQPpoGHTKmk X-Received: by 2002:a17:906:e89:: with SMTP id p9mr1572118ejf.95.1570609272655; Wed, 09 Oct 2019 01:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609272; cv=none; d=google.com; s=arc-20160816; b=jY2cJVletgtGIPZJ06QmjpPuK+mjJBJ5BjY9LB3T92v1UzIj3jjS5AOn4nBXmb8ww0 Hkhh0nwsNlwIM3VduB9jMCD94FQtBDMdMEjJqEoPpZM3OcpVmK9iZ10xJR13IoPYcNok lzA8mmMq3TwfFDHsF8H6cSt9GvZccMeQwQYLYXwwEUJ0iZ/45z98Z3opVv6tt1oWaQi2 A7I2CAU20LjbUlVNToC0fcWlm76ajG6H+TOKEzXpflrwe8F6zrHqjdowBliEBeAs5fuY C5m98YelcGNbwMKxfz/2t53N08UN1eBLMOc8HH6Lym30zrMtf1lgrrf1A0p0hJwpU8GY FWpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature; bh=ifYnvxUG5HBIGIpnHZTNxXTg4T0bB7bdhUJUbDtpY+Q=; b=zbbSbPzqxuaowSrrRNVba2k902EwQcDYcDmKzi3uNRrE0d15ikCxPL+j3BE8L0UZcq ell+VLzexRgNSIkBJbYhsuA4Gyi2ocZQwuX5c3znh+LO5n26ztsh8LnPW0otKUMtihVn W+GIZ9fq58vLTl3zJ2chn5fV68TpbsQHDdg9X858uc2W831eL5zDZ1nFQoELYsgD/kw2 plbSR8BI5dlpptUzQPEFvc/IUlmXJ9UQv5H0My5a0pQFDgj1ayhm6q4wgu9RPFs6XpZa AYs1qhMOH4U7ZzkEBt0vKDlk8jJ4jHNGHNnSKKR4+J6rvihruKSh2r0aRbEgvJ6Ngx6f L2vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HqPhkw3u; dkim=pass header.i=@codeaurora.org header.s=default header.b=Aln+mezi; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx24si740040ejb.138.2019.10.09.01.20.48; Wed, 09 Oct 2019 01:21:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HqPhkw3u; dkim=pass header.i=@codeaurora.org header.s=default header.b=Aln+mezi; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbfJIISl (ORCPT + 99 others); Wed, 9 Oct 2019 04:18:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51338 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfJIISk (ORCPT ); Wed, 9 Oct 2019 04:18:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EF60261B08; Wed, 9 Oct 2019 08:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570609120; bh=fkegv0laAJ4hlSt28jWVa0qekMb+Sxt77qJ84+gMelE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HqPhkw3uBEJz8M4m+Lj1jqbniDmIHHFmSupmF5tbmv0cPJkgCVUv3/hhUt40HuDUB 5xhQz0mm33MsG0m8puSAxzo+/4wz2CRP7YChRQvzwcdFYA+idsRWIYqeb2hWPXcA8G wJlbtNzMfdSFMY36bAnTrpTJ+ipr+OY5crr/umCg= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from smtp.codeaurora.org (unknown [180.166.53.21]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: miaoqing@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 97BF161A1B; Wed, 9 Oct 2019 08:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570609118; bh=fkegv0laAJ4hlSt28jWVa0qekMb+Sxt77qJ84+gMelE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aln+meziXaFPjbhKBqCILzpi+ZD34pOOzxhrv3tA4zSLMVwPtp5R54uVm6OghtV8h nCyYXGRhCzq+2uG3/lnawZxORkyVLymUN0xgZebjON6UEC2vbsYVWqwdWHv2I7exHM IIWwdAxl3hsNTghwhZyeT46fBmcj6o/bp/sgsxQc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 97BF161A1B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=miaoqing@codeaurora.org Received: by smtp.codeaurora.org (sSMTP sendmail emulation); Wed, 09 Oct 2019 16:18:31 +0800 From: Miaoqing Pan To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Miaoqing Pan Subject: [PATCH 2/2] ath10k: fix memory leak for tpc_stats_final Date: Wed, 9 Oct 2019 16:18:09 +0800 Message-Id: <1570609089-22071-2-git-send-email-miaoqing@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1570609089-22071-1-git-send-email-miaoqing@codeaurora.org> References: <1570609089-22071-1-git-send-email-miaoqing@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The memory of ar->debug.tpc_stats_final is reallocated every debugfs reading, it should be freed in ath10k_debug_destroy() for the last allocation. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Miaoqing Pan --- drivers/net/wireless/ath/ath10k/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 40baf25..04c50a2 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2532,6 +2532,7 @@ void ath10k_debug_destroy(struct ath10k *ar) ath10k_debug_fw_stats_reset(ar); kfree(ar->debug.tpc_stats); + kfree(ar->debug.tpc_stats_final); } int ath10k_debug_register(struct ath10k *ar) -- 1.9.1