Skip to content

Commit

Permalink
wlcore: fix a couple small memory leaks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Jul 10, 2012
1 parent 0344dcd commit f7ace5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wlcore/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down

0 comments on commit f7ace5f

Please sign in to comment.