mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Maksim Salau <maksim.salau@gmail.com>
Cc: Juergen Stuber <starblue@users.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	legousb-devel@lists.sourceforge.net, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Alfredo Rafael Vicente Boix <alviboi@gmail.com>
Subject: Re: [PATCH] usb: misc: legousbtower: Fix memory leak
Date: Fri, 5 May 2017 10:32:40 +0300	[thread overview]
Message-ID: <20170505073240.GC26032@kuha.fi.intel.com> (raw)
In-Reply-To: <20170504195152.1862-1-maksim.salau@gmail.com>

Hi,

On Thu, May 04, 2017 at 10:51:52PM +0300, Maksim Salau wrote:
> get_version_reply is not freed if function returns with success.
> Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529

Pointing the commit like that is probable fine, but you should also
use "Fixes" tag:

Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack")

Please check Documentation/process/submitting-patches.rst for more
information.

> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

You are signing the patch for me which you should not be doing in this
case. More appropriate tag would be for example "Suggested-by" or
something like that. There is more information about this too in
Documentation/process/submitting-patches.rst


> Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
> ---
>  drivers/usb/misc/legousbtower.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
> index aa3c280..0782ac6 100644
> --- a/drivers/usb/misc/legousbtower.c
> +++ b/drivers/usb/misc/legousbtower.c
> @@ -926,6 +926,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
>  		 USB_MAJOR, dev->minor);
>  
>  exit:
> +	kfree(get_version_reply);
>  	return retval;
>  
>  error:
> -- 
> 2.9.3


Thanks,

-- 
heikki

      reply	other threads:[~2017-05-05  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 19:51 Maksim Salau
2017-05-05  7:32 ` Heikki Krogerus [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=20170505073240.GC26032@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=alviboi@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=legousb-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=maksim.salau@gmail.com \
    --cc=starblue@users.sourceforge.net \
    /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

Powered by JetHome