Bluetooth: Add missing kfree() on error path in Atheros driver
authorDan Carpenter <error27@gmail.com>
Mon, 8 Feb 2010 05:43:17 +0000 (08:43 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 27 Feb 2010 13:05:38 +0000 (14:05 +0100)
Add a couple kfree() calls on an error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/ath3k.c

index add9485ca5b668d6647714dfa4d16a55acecff3f..128cae4e8629465429cf271209f587b8e192b3ad 100644 (file)
@@ -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;
        }