summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-30 15:07:55 +0300
committerJohn W. Linville <linville@tuxdriver.com>2012-07-10 12:10:15 -0400
commitf7ace5f044295a06a26cd1b4c176b011b0297ac4 (patch)
tree93ef719ee1f8603b6dfb74f6360f3614e7b087b8 /drivers
parent0344dcd3b50f68bb79473d00e46c5fd503c21039 (diff)
wlcore: fix a couple small memory leaks
We should free "chunk" here before returning the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wlcore/boot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c
index 61113291a89..375ea574eaf 100644
--- a/drivers/net/wireless/ti/wlcore/boot.c
+++ b/drivers/net/wireless/ti/wlcore/boot.c
@@ -192,7 +192,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
partition.mem.start = dest;
ret = wlcore_set_partition(wl, &partition);
if (ret < 0)
- return ret;
+ goto out;
/* 10.1 set partition limit and chunk num */
chunk_num = 0;
@@ -208,7 +208,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
partition.mem.start = addr;
ret = wlcore_set_partition(wl, &partition);
if (ret < 0)
- return ret;
+ goto out;
}
/* 10.3 upload the chunk */