All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Krumboeck <krumboeck@universalnet.at>
To: Bjorn Van Tilt <bjorn.vantilt@gmail.com>, linux-can@vger.kernel.org
Subject: Re: [PATCH: 3.11] usb_8dev: Fix memory leak in usb_8dev_start_xmit
Date: Sat, 29 Mar 2014 08:17:44 +0100	[thread overview]
Message-ID: <53367398.7010006@universalnet.at> (raw)
In-Reply-To: <CAMEA=P1AaDL94S8kaep-F012WAseimAyB7ME11Qzd0UMbp-BGg@mail.gmail.com>

Applied to the driver sources (outside kernel tree): https://github.com/krumboeck/usb2can

Thank you!


regards,
Bernd



Am 2014-03-24 15:13, schrieb Bjorn Van Tilt:
> Fixed a memory leak when an error occurred in the transmit function.
> In the error handling the urb wasn't freed before returning. There was
> also a call to the usb_unanchor_urb() function but the urb wasn't
> anchored.
>
> Signed-off-by: Bjorn Van Tilt <bjorn.vantilt@gmail.com>
>
> ---
> --- drivers/net/can/usb/usb_8dev.c.orig 2014-03-24 13:40:45.000000000 +0100
> +++ drivers/net/can/usb/usb_8dev.c 2014-03-24 13:44:32.076086036 +0100
> @@ -698,8 +698,8 @@ static netdev_tx_t usb_8dev_start_xmit(s
>    return NETDEV_TX_OK;
>
>   nofreecontext:
> - usb_unanchor_urb(urb);
>    usb_free_coherent(priv->udev, size, buf, urb->transfer_dma);
> + usb_free_urb(urb);
>
>    netdev_warn(netdev, "couldn't find free context");
>


      parent reply	other threads:[~2014-03-29  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 14:13 [PATCH: 3.11] usb_8dev: Fix memory leak in usb_8dev_start_xmit Bjorn Van Tilt
2014-03-24 14:34 ` Marc Kleine-Budde
2014-03-29  7:17 ` Bernd Krumboeck [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=53367398.7010006@universalnet.at \
    --to=krumboeck@universalnet.at \
    --cc=bjorn.vantilt@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /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.