All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] wlcore: fix a couple small memory leaks
@ 2012-06-30 12:07 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-06-30 12:07 UTC (permalink / raw)
  To: Luciano Coelho
  Cc: John W. Linville, Arik Nemtsov, Eliad Peller, Ido Yariv,
	Paul Gortmaker, linux-wireless, kernel-janitors

We should free "chunk" here before returning the error code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c
index 8965960..48b2fee 100644
--- a/drivers/net/wireless/ti/wlcore/boot.c
+++ b/drivers/net/wireless/ti/wlcore/boot.c
@@ -141,7 +141,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;
@@ -157,7 +157,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 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch] wlcore: fix a couple small memory leaks
@ 2012-06-30 12:07 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-06-30 12:07 UTC (permalink / raw)
  To: Luciano Coelho
  Cc: John W. Linville, Arik Nemtsov, Eliad Peller, Ido Yariv,
	Paul Gortmaker, linux-wireless, kernel-janitors

We should free "chunk" here before returning the error code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c
index 8965960..48b2fee 100644
--- a/drivers/net/wireless/ti/wlcore/boot.c
+++ b/drivers/net/wireless/ti/wlcore/boot.c
@@ -141,7 +141,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;
@@ -157,7 +157,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 */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch] wlcore: fix a couple small memory leaks
  2012-06-30 12:07 ` Dan Carpenter
@ 2012-07-08 13:12   ` Luciano Coelho
  -1 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2012-07-08 13:12 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: John W. Linville, Arik Nemtsov, Eliad Peller, Ido Yariv,
	Paul Gortmaker, linux-wireless, kernel-janitors

On Sat, 2012-06-30 at 15:07 +0300, Dan Carpenter wrote:
> We should free "chunk" here before returning the error code.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied and pushed, thanks a lot, Dan!

--
Luca.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] wlcore: fix a couple small memory leaks
@ 2012-07-08 13:12   ` Luciano Coelho
  0 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2012-07-08 13:12 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: John W. Linville, Arik Nemtsov, Eliad Peller, Ido Yariv,
	Paul Gortmaker, linux-wireless, kernel-janitors

On Sat, 2012-06-30 at 15:07 +0300, Dan Carpenter wrote:
> We should free "chunk" here before returning the error code.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied and pushed, thanks a lot, Dan!

--
Luca.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-08 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 12:07 [patch] wlcore: fix a couple small memory leaks Dan Carpenter
2012-06-30 12:07 ` Dan Carpenter
2012-07-08 13:12 ` Luciano Coelho
2012-07-08 13:12   ` Luciano Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.