All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] bluetooth: ath3k: add kfree() on error path
@ 2010-02-08  5:43 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-02-08  5:43 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Alicke Xu, Luis R. Rodriguez, Vikram Kandukuri, linux-bluetooth,
	kernel-janitors

Add a couple kfree() calls on an error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>

---
I only compile tested this one and it's obvoiusly low priority.  Could it go into linux-next?

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index add9485..128cae4 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -143,6 +143,8 @@ static int ath3k_probe(struct usb_interface *intf,
 	usb_set_intfdata(intf, data);
 	if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) {
 		usb_set_intfdata(intf, NULL);
+		kfree(data->fw_data);
+		kfree(data);
 		return -EIO;
 	}
 

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

* [patch] bluetooth: ath3k: add kfree() on error path
@ 2010-02-08  5:43 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-02-08  5:43 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Alicke Xu, Luis R. Rodriguez, Vikram Kandukuri, linux-bluetooth,
	kernel-janitors

Add a couple kfree() calls on an error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>

---
I only compile tested this one and it's obvoiusly low priority.  Could it go into linux-next?

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index add9485..128cae4 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -143,6 +143,8 @@ static int ath3k_probe(struct usb_interface *intf,
 	usb_set_intfdata(intf, data);
 	if (ath3k_load_firmware(data, data->fw_data, data->fw_size)) {
 		usb_set_intfdata(intf, NULL);
+		kfree(data->fw_data);
+		kfree(data);
 		return -EIO;
 	}
 

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

* Re: [patch] bluetooth: ath3k: add kfree() on error path
  2010-02-08  5:43 ` Dan Carpenter
@ 2010-02-08  8:00   ` Marcel Holtmann
  -1 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-02-08  8:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Alicke Xu, Luis R. Rodriguez, Vikram Kandukuri, linux-bluetooth,
	kernel-janitors

Hi Dan,

> Add a couple kfree() calls on an error path.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> ---
> I only compile tested this one and it's obvoiusly low priority.  Could it go into linux-next?

patch has been applied. Thanks.

Regards

Marcel



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

* Re: [patch] bluetooth: ath3k: add kfree() on error path
@ 2010-02-08  8:00   ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-02-08  8:00 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Alicke Xu, Luis R. Rodriguez, Vikram Kandukuri, linux-bluetooth,
	kernel-janitors

Hi Dan,

> Add a couple kfree() calls on an error path.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> ---
> I only compile tested this one and it's obvoiusly low priority.  Could it go into linux-next?

patch has been applied. Thanks.

Regards

Marcel



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

end of thread, other threads:[~2010-02-08  8:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08  5:43 [patch] bluetooth: ath3k: add kfree() on error path Dan Carpenter
2010-02-08  5:43 ` Dan Carpenter
2010-02-08  8:00 ` Marcel Holtmann
2010-02-08  8:00   ` Marcel Holtmann

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.