From: Grazvydas Ignotas <notasas@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Luciano Coelho <coelho@ti.com>,
linux-wireless@vger.kernel.org,
Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH 3/3] wl1251: Fix memory leaks in SPI initialization
Date: Sat, 16 Jun 2012 22:26:48 +0300 [thread overview]
Message-ID: <1339874808-9991-4-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1339874808-9991-1-git-send-email-notasas@gmail.com>
This patch fixes two memory leaks in the SPI initialization code.
Patch based on old maemo patch by:
Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/net/wireless/ti/wl1251/spi.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 87f6305..567660c 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl)
spi_sync(wl_to_spi(wl), &m);
wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
+
+ kfree(cmd);
}
static void wl1251_spi_wake(struct wl1251 *wl)
@@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl)
spi_sync(wl_to_spi(wl), &m);
wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
+
+ kfree(cmd);
}
static void wl1251_spi_reset_wake(struct wl1251 *wl)
--
1.7.0.4
next prev parent reply other threads:[~2012-06-16 19:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-16 19:26 [PATCH 0/3] wl1251: maemo fixes Grazvydas Ignotas
2012-06-16 19:26 ` [PATCH 1/3] wl1251: fix TSF calculation Grazvydas Ignotas
2012-06-20 9:23 ` Guido Gavilanes
2012-06-16 19:26 ` [PATCH 2/3] wl1251: always report beacon loss to the stack Grazvydas Ignotas
2012-06-16 19:26 ` Grazvydas Ignotas [this message]
2012-07-05 9:45 ` [PATCH 0/3] wl1251: maemo fixes Grazvydas Ignotas
2012-07-05 9:55 ` Grazvydas Ignotas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339874808-9991-4-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).