Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3022100pxb; Mon, 16 Nov 2020 03:50:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCmcUVDfENaDVM8AUnHICfPpAft21aSLhtF6TNZdTvD3f3Nu1lpxPGwVEKakON1QIlvYTP X-Received: by 2002:a50:b761:: with SMTP id g88mr15306081ede.387.1605527437815; Mon, 16 Nov 2020 03:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605527437; cv=none; d=google.com; s=arc-20160816; b=uNQJBpge/QYHPDgIfSTK5UmcRAuz28JYqVGlKt6ETEd7Fn+/KfFB9XBA6WvG3l8HDG 9k+djLrHL0fjZxZ5lSVlRIdLCzU5RTkxf17L2HGX31WsrRnX9F6dclUilQfsClUBzywh OlczRn1PZYTyKAgxj+r4bhAakMC3PQCV2+IwOSnP2hdI1M8uBmyc4bUFxVIHChU19v5M 3wSTNV0NhfnWIFa1qtIADR1FUOkvXqvFM3SfDU7Nu6xBZfOxa+GsqAcNwQ1hfXKN6wiq fYcuQJOudgmX58uh+OjlslDO2Xw/wGKigQlssZmic006HETzKr0k3JXq64lIRKR4IMy+ gZ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=Tf37X8mJ6Sz4IjoDZ+nFh/oDXFun0L5f2GaWK7orBmQ=; b=E2ZlQb42PBtC9SrGKasJpMAIR5jQR5Lw8Aqq6xTGwOdMX1132ELC8BZEn+JGZBiE2g mka+p7SBHOPAmMdybLjZFOLGjNWQl1iPcrgJ7aew/rj3nM1JevovFaNAVE59IGBiS9Mf +RpH/Rqdl51kNcBLMkKMyoT1EXzpNbyYZ6FI1DRg2LguYp6d+djxECUHYggsdnkCVRrY 5t5yDkRkFIl85Nj4t+KMpb+P8dsiTsULUdi1YrNSEL74EMDe9uDLVSsJkRjKFdA1z+Th Bwv5WIQ+N5I1nEo9brFfBcfXRw9P/A+RQXJKHqTU86ClZxp+jitHq3m0iWFFy8CXzaeM DOkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si9514829ejb.597.2020.11.16.03.49.59; Mon, 16 Nov 2020 03:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728688AbgKPLqO (ORCPT + 99 others); Mon, 16 Nov 2020 06:46:14 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:54577 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726487AbgKPLqO (ORCPT ); Mon, 16 Nov 2020 06:46:14 -0500 X-UUID: ead7216fc39747af89c05bef180c38be-20201116 X-UUID: ead7216fc39747af89c05bef180c38be-20201116 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 599935917; Mon, 16 Nov 2020 19:46:09 +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 CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , linux-mediatek , Shayne Chen 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 Content-Type: text/plain X-TM-SNTS-SMTP: 6E7635135E97EA2994EC37618BF1404DFA992401098CD3329F22247E3E1BBC962000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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