From: Connor Hansen <cmdkhh@gmail.com>
To: marcel@holtmann.org
Cc: padovan@profusion.mobi, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, Connor Hansen <cmdkhh@gmail.com>
Subject: [PATCH] :V2 drivers/bluetooth/bpa10x.c: missing kfrees
Date: Sat, 11 Jun 2011 14:36:11 -0700 [thread overview]
Message-ID: <1307828171-22010-1-git-send-email-cmdkhh@gmail.com> (raw)
both bpa10x_submit_initr_urb() and bpa10x_submit_bulk_urb()
malloc a char buffer(buf) for usb_fill_init_usb() but fail to
free it after freeing the urb.
Likewise, bpa10x_send_frame() allocates a usb_ctrlrequest(dr)
for sending packets but does not free it after the
usb_fill_control_urb() call.
Signed-off-by: Connor Hansen <cmdkhh@gmail.com>
---
drivers/bluetooth/bpa10x.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 751b338..0a2dd9e 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -254,6 +254,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)
}
usb_free_urb(urb);
+ kfree(buf);
return err;
}
@@ -295,6 +296,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)
}
usb_free_urb(urb);
+ kfree(buf);
return err;
}
@@ -393,6 +395,7 @@ static int bpa10x_send_frame(struct sk_buff *skb)
skb->data, skb->len, bpa10x_tx_complete, skb);
hdev->stat.cmd_tx++;
+ kfree(dr);
break;
case HCI_ACLDATA_PKT:
--
1.7.4.4
next reply other threads:[~2011-06-11 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 21:36 Connor Hansen [this message]
2011-06-12 8:13 ` [PATCH] :V2 drivers/bluetooth/bpa10x.c: missing kfrees Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307828171-22010-1-git-send-email-cmdkhh@gmail.com \
--to=cmdkhh@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=padovan@profusion.mobi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.