Skip to contentSkip to conversation

bluetooth: ath3k: add kfree() on error path

PATCH In review Dan Carpenter 2 participants 2 messages Feb 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth: ath3k: add kfree() on error path

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

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

drivers/bluetooth/ath3k.c +2 -0
index add9485..128cae4 100644
@@ -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;
 	}
 
maintainer
#1 lore raw

Hi Dan,

Quoted 6 lines

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

---
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