Thread (2 messages) 2 messages, 2 authors, 2010-02-08
STALE6010d

[patch] bluetooth: ath3k: add kfree() on error path

From: Dan Carpenter <hidden>
Date: 2010-02-08 05:43:17
Also in: kernel-janitors
Subsystem: bluetooth drivers, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

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

Signed-off-by: Dan Carpenter <redacted>

---
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;
 	}
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help