linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Coelho <luciano.coelho@nokia.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	Juuso Oikarinen <juuso.oikarinen@nokia.com>
Subject: [PATCH 04/24] wl1271: Fix memory leaks in SPI initialization
Date: Fri, 26 Mar 2010 12:53:13 +0200	[thread overview]
Message-ID: <1269600813-32145-5-git-send-email-luciano.coelho@nokia.com> (raw)
In-Reply-To: <1269600813-32145-1-git-send-email-luciano.coelho@nokia.com>

From: Juuso Oikarinen <juuso.oikarinen@nokia.com>

This patch fixes two memory leaks in the SPI initialization code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
---
 drivers/net/wireless/wl12xx/wl1271_spi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c
index db6c9f5..39b7dea 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -104,6 +104,7 @@ static void wl1271_spi_reset(struct wl1271 *wl)
 	spi_message_add_tail(&t, &m);
 
 	spi_sync(wl_to_spi(wl), &m);
+	kfree(cmd);
 
 	wl1271_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
 }
@@ -158,6 +159,7 @@ static void wl1271_spi_init(struct wl1271 *wl)
 	spi_message_add_tail(&t, &m);
 
 	spi_sync(wl_to_spi(wl), &m);
+	kfree(cmd);
 
 	wl1271_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
 }
-- 
1.6.3.3


  parent reply	other threads:[~2010-03-26 10:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 10:53 [PATCH 00/24] wl1271: bunch of patches from our internal tree wk12 Luciano Coelho
2010-03-26 10:53 ` [PATCH 01/24] wl1271: fix wl1271_spi driver name Luciano Coelho
2010-03-26 10:53 ` [PATCH 02/24] wl1271: Clean up RX rate reporting Luciano Coelho
2010-03-26 10:53 ` [PATCH 03/24] wl1271: Add TX " Luciano Coelho
2010-03-26 10:53 ` Luciano Coelho [this message]
2010-03-26 10:53 ` [PATCH 05/24] wl1271: Fix memory leak in scan command handling Luciano Coelho
2010-03-26 10:53 ` [PATCH 06/24] wl1271: Configure clock-request drive mode to open-drain Luciano Coelho
2010-03-26 10:53 ` [PATCH 07/24] wl1271: Warnings caused by wrong format specifiers fixed Luciano Coelho
2010-03-26 10:53 ` [PATCH 08/24] wl1271: Fix memory leak in cmd_data_path Luciano Coelho
2010-03-26 10:53 ` [PATCH 09/24] wl1271: Update busyword checking mechanism Luciano Coelho
2010-03-26 10:53 ` [PATCH 10/24] wl1271: Remove device MAC-address randomization Luciano Coelho
2010-03-26 10:53 ` [PATCH 11/24] wl1271: wait for join command complete event Luciano Coelho
2010-03-26 10:53 ` [PATCH 12/24] wl1271: wait for disconnect " Luciano Coelho
2010-03-26 10:53 ` [PATCH 13/24] wl1271: remove deprecated usage of RX status noise Luciano Coelho
2010-03-26 10:53 ` [PATCH 14/24] wl1271: Disable connection monitoring while not associated Luciano Coelho
2010-03-26 10:53 ` [PATCH 15/24] wl1271: Fix ad-hoc mode handling Luciano Coelho
2010-03-26 10:53 ` [PATCH 16/24] wl1271: Update beacon interval properly for ad-hoc Luciano Coelho
2010-03-26 10:53 ` [PATCH 17/24] wl1271: Removed checking of PSM from handling BSS_LOST_EVENT Luciano Coelho
2010-03-26 10:53 ` [PATCH 18/24] wl1271: Fix memory leak in firmware crash scenario Luciano Coelho
2010-03-26 10:53 ` [PATCH 19/24] wl1271: Configure probe-request template when associated Luciano Coelho
2010-03-26 10:53 ` [PATCH 20/24] wl1271: Disconnect if PSM entry fails Luciano Coelho
2010-03-26 10:53 ` [PATCH 21/24] wl1271: Configure HW connection monitor Luciano Coelho
2010-03-26 10:53 ` [PATCH 22/24] wl1271: Add keep-alive frame template support Luciano Coelho
2010-03-26 10:53 ` [PATCH 23/24] wl1271: Enable hardware keep alive messages Luciano Coelho
2010-03-26 10:53 ` [PATCH 24/24] wl1271: Fix msleep() delay while waiting for completion Luciano Coelho
2010-03-26 13:02 ` [PATCH 00/24] wl1271: bunch of patches from our internal tree wk12 John W. Linville
2010-03-26 13:13   ` Luciano Coelho
2010-03-26 13:26     ` John W. Linville
2010-03-26 13:37       ` Luciano Coelho

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=1269600813-32145-5-git-send-email-luciano.coelho@nokia.com \
    --to=luciano.coelho@nokia.com \
    --cc=juuso.oikarinen@nokia.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).