aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-30 08:07:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-10 12:10:15 -0400
commitf7ace5f044295a06a26cd1b4c176b011b0297ac4 (patch)
tree93ef719ee1f8603b6dfb74f6360f3614e7b087b8 /drivers/net/wireless/ti
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/net/wireless/ti')
-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 61113291a890..375ea574eafb 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,
192 partition.mem.start = dest; 192 partition.mem.start = dest;
193 ret = wlcore_set_partition(wl, &partition); 193 ret = wlcore_set_partition(wl, &partition);
194 if (ret < 0) 194 if (ret < 0)
195 return ret; 195 goto out;
196 196
197 /* 10.1 set partition limit and chunk num */ 197 /* 10.1 set partition limit and chunk num */
198 chunk_num = 0; 198 chunk_num = 0;
@@ -208,7 +208,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
208 partition.mem.start = addr; 208 partition.mem.start = addr;
209 ret = wlcore_set_partition(wl, &partition); 209 ret = wlcore_set_partition(wl, &partition);
210 if (ret < 0) 210 if (ret < 0)
211 return ret; 211 goto out;
212 } 212 }
213 213
214 /* 10.3 upload the chunk */ 214 /* 10.3 upload the chunk */