linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Connor Hansen <cmdkhh@gmail.com>
Cc: padovan@profusion.mobi, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] :V2 drivers/bluetooth/bpa10x.c: missing kfrees
Date: Sun, 12 Jun 2011 10:13:54 +0200	[thread overview]
Message-ID: <1307866435.2589.48.camel@aeonflux> (raw)
In-Reply-To: <1307828171-22010-1-git-send-email-cmdkhh@gmail.com>

Hi Connor,

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

you do realize that URB_FREE_BUFFER flag is used?

> Likewise, bpa10x_send_frame() allocates a usb_ctrlrequest(dr)
> for sending packets but does not free it after the
> usb_fill_control_urb() call.

There is a kfree(urb->setup_packet) in the complete callback. So I am
not following where you would see a memory leak here.

Regards

Marcel



      reply	other threads:[~2011-06-12  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 21:36 [PATCH] :V2 drivers/bluetooth/bpa10x.c: missing kfrees Connor Hansen
2011-06-12  8:13 ` Marcel Holtmann [this message]

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=1307866435.2589.48.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=cmdkhh@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).