]> git.openpandora.org Git - pandora-wifi.git/commitdiff
wl1251: Fix memory leaks in SPI initialization
authorYuri Ershov <ext-yuri.ershov@nokia.com>
Wed, 27 Oct 2010 10:46:19 +0000 (14:46 +0400)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 31 Oct 2010 20:10:33 +0000 (22:10 +0200)
This patch fixes two memory leaks in the SPI initialization code.

Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
drivers/net/wireless/wl12xx/wl1251_spi.c

index 601bde2eb4eb97d5482da6cabbf939e4e7e7fac6..6f37740336ba5b4d98b3d2009717b1ed3cce9f44 100644 (file)
@@ -76,6 +76,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)
@@ -130,6 +132,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)