From: Juuso Oikarinen Date: Fri, 26 Mar 2010 10:53:13 +0000 (+0200) Subject: wl1271: Fix memory leaks in SPI initialization X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f83cce3551a6238f6c86495ed949b31303c21a6d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git wl1271: Fix memory leaks in SPI initialization This patch fixes two memory leaks in the SPI initialization code. Signed-off-by: Juuso Oikarinen Reviewed-by: Kalle Valo Signed-off-by: Luciano Coelho Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c index db6c9f5d5779..39b7dea6358e 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); }