From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Mon, 08 Feb 2010 05:43:17 +0000 Subject: [patch] bluetooth: ath3k: add kfree() on error path Message-Id: <20100208054317.GA10576@bicker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Marcel Holtmann Cc: Alicke Xu , "Luis R. Rodriguez" , Vikram Kandukuri , linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org Add a couple kfree() calls on an error path. Signed-off-by: Dan Carpenter --- 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; }