Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FE6BC5519F for ; Mon, 16 Nov 2020 11:59:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1FF92224B for ; Mon, 16 Nov 2020 11:59:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P8fSqkeW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Z5QFfvsV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1FF92224B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=hijbICoiz48HoRaQNd5MPdRED/yA212sAKUIEVeW2vc=; b=P8fSqkeWw0W3yUtDRojB+9RIOr 4YvyQqOUnTwzrFj5loUrjxWVoifiWhuCRKRQFYmAHhVlNPIxMSIgoAypquEAYefrZ4VKqdgzDCaAv 6oDptPjGqLjh0eif8dnyOAw9EXIOEHHE7WQW2hXhqSUiTfvCSoNrYbnt2OF5xbtSGXqdwEVH+/x1/ SfXIZ5obwu9rLjd9Pj9G1hermBtaDWtGGM54srDsNa8g5xLk2JB7B+/BvW/swJZKM7qcsxLOsqX76 iItZr6CdHbmVm0qn0DJ8AggXgDRbvDyZ38CBVWRjYv4njMttlXg7eFL6Z2ST800cmta7MHEebJWFV SSxtoqHg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kedAL-00047d-Ny; Mon, 16 Nov 2020 11:59:25 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kedAI-00047H-VU for linux-mediatek@lists.infradead.org; Mon, 16 Nov 2020 11:59:24 +0000 X-UUID: 85aae2963a9d4c19a17455ee156ef37a-20201116 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=WoJ93Ts4p0eTu6Mpug3n6c1gKy/R8O3+zhWhJsJXRtQ=; b=Z5QFfvsV9L9RdRdM/QhqEz8x4BygL4yH4wUsI5YxBvcVmDb8C4mZttTVuNyThQswAde9uQkqlPQjzGLZp4DjY+Q9zqFGXcMdwDiPTBf7gIuWH622If3Ybsvpi6cYYKq2NfaudsJwQf4GoeJeXewacO/tZ/iMvpCcJknLd4OnjMQ=; X-UUID: 85aae2963a9d4c19a17455ee156ef37a-20201116 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 928634093; Mon, 16 Nov 2020 03:56:06 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Nov 2020 03:46:08 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 16 Nov 2020 19:46:07 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 16 Nov 2020 19:46:07 +0800 From: Shayne Chen To: Felix Fietkau Subject: [PATCH] mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate() Date: Mon, 16 Nov 2020 19:45:54 +0800 Message-ID: <20201116114554.15899-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: 6E7635135E97EA2994EC37618BF1404DFA992401098CD3329F22247E3E1BBC962000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_065923_221669_6FF7BBDE X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek , Lorenzo Bianconi , Ryder Lee , linux-wireless , Shayne Chen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Free the skb to prevent memory leak. Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 3e1f7ee..4776532 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3515,5 +3515,7 @@ int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif, break; } + dev_kfree_skb(skb); + return 0; } -- 2.17.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek