From patchwork Tue Sep 20 06:43:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prameela Rani Garnepudi X-Patchwork-Id: 9341095 X-Patchwork-Delegate: kvalo@adurom.com 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 80CD5601C2 for ; Tue, 20 Sep 2016 06:46:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65B1E2920E for ; Tue, 20 Sep 2016 06:46:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5827A2928E; Tue, 20 Sep 2016 06:46:30 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3044D2920E for ; Tue, 20 Sep 2016 06:46:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751282AbcITGq1 (ORCPT ); Tue, 20 Sep 2016 02:46:27 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36489 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbcITGq0 (ORCPT ); Tue, 20 Sep 2016 02:46:26 -0400 Received: by mail-pf0-f194.google.com with SMTP id n24so493718pfb.3 for ; Mon, 19 Sep 2016 23:46:26 -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; bh=wqilL5hdceLbRuzhd4ZnrGp90Y/02LoSjDPI/MZTnbs=; b=DgGTa30zC4QayBx96UYKIFbiqrJvw8rv9ZzVk67HnE8qCthKMiixvIuMzzzROeoH0e bxAS0aV/fN4qim6fF5zfhMJKYbUC/HX2PAluYe6dhtNfH25Nnbe7ahD82KZbcIER93bd ZfyY2KOtGDP2iQccVMrQMSTo2Z8v5yecYopZiJk9R1W0m82xSkSwUjMzhgtYOtnaZq8p VYuYNrS0M8YpBOQiiT+XkNQrGnfQEQdJbZ2mNQnmnkKC7e369QD16b1vlI8wpbOAXHE6 xU52iVMFEEsJn1cr+JH9U79vdpqN3PJRN/MyXuJQwB2S+PK2Dxb8WrG9wnUfxxs8xLqQ xgJg== 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; bh=wqilL5hdceLbRuzhd4ZnrGp90Y/02LoSjDPI/MZTnbs=; b=Th06dBEsUdRqo/cL6uUywSAabEAswSluljwu1SvUlLe1SeSzoYPKNVk6j+l4yJnUd/ +81430IU7hTQfI6XHrf3DVbPXR1Epc1uaEEHuzlyWvkSZt7bY+dmCJJK6kqnZ2Q4ZF4B vAXdmGJ69On7f1qUTJ2k8Zj7ltHPyuE+YCNvLGEeUT4pqFcEuIJ2/dn7DMi6vGhK2sR5 hx0YXLaJ4TidsWYzsmvpyEb9ieq93lkh3O9fTVqPsdcMPT9LicK4zoF/eOxE0HI9plR6 9ad/r4yCk4K83DdbuvjtQqNqdHysDLW4SH0tT0EFG2CBxPPbXLmJzRLDGm25N1QB+4Xw ensw== X-Gm-Message-State: AE9vXwPVFsX+PDCgURfVl3GyuCETvH8ndiHq82OfNAtQNd4K8vX2zgjsIT6w/MuFNQVXKA== X-Received: by 10.98.50.2 with SMTP id y2mr53194064pfy.138.1474353986082; Mon, 19 Sep 2016 23:46:26 -0700 (PDT) Received: from lapt225.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id c145sm43118014pfb.15.2016.09.19.23.46.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 23:46:25 -0700 (PDT) From: Prameela Rani Garnepudi To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org, johannes.berg@intel.com, hofrat@osadl.org, xypron.glpk@gmx.de, Prameela Rani Garnepudi , Prameela Rani Garnepudi Subject: [PATCH 1/1] rsi: fix memory leak in debugfs entry and supported bands Date: Tue, 20 Sep 2016 12:13:04 +0530 Message-Id: <1474353784-9552-1-git-send-email-prameela.j04cs@gmail.com> X-Mailer: git-send-email 2.4.11 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Prameela Rani Garnepudi Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Prameela Rani Garnepudi --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index dbb2389..dc64532 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band) void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; + int i; if (hw) { ieee80211_stop_queues(hw); @@ -201,7 +202,16 @@ void rsi_mac80211_detach(struct rsi_hw *adapter) ieee80211_free_hw(hw); } + for (i = 0; i < 2; i++) { + struct ieee80211_supported_band *sbands = &adapter->sbands[i]; + + kfree(sbands->channels); + } + +#ifdef CONFIG_RSI_DEBUGFS rsi_remove_dbgfs(adapter); + kfree(adapter->dfsentry); +#endif } EXPORT_SYMBOL_GPL(rsi_mac80211_detach);