All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christian Engelmayer <cengelma@gmx.at>
Cc: devel@driverdev.osuosl.org, mcgrof@do-not-panic.com,
	gregkh@linuxfoundation.org, oat.elena@gmail.com,
	Larry.Finger@lwfinger.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key()
Date: Thu, 1 May 2014 13:50:25 +0300	[thread overview]
Message-ID: <20140501105025.GZ4963@mwanda> (raw)
In-Reply-To: <20140501123057.5f00e30d@spike>

On Thu, May 01, 2014 at 12:30:57PM +0200, Christian Engelmayer wrote:
> Fix a potential leak in the error path of rtw_set_key(). In case the requested
> algorithm is not supported by the driver, the function returns without
> enqueuing or freeing the already allocated command and parameter structs. Use
> a centralized exit path and make sure that all memory is freed correctly.
> Detected by Coverity - CID 1077716, 1077717.
> 
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> ---
> v2: Added changes requested by Dan Carpenter:
> 
>    * Just return directly where no cleanup is needed.
>    * Prefer naming labels by the labeled action rather than the goto location.
> 
> Compile tested and applies against branch staging-next of tree
> git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

Looks good.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


  reply	other threads:[~2014-05-01 10:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 10:30 [PATCH v2] staging: rtl8188eu: fix potential leak in rtw_set_key() Christian Engelmayer
2014-05-01 10:50 ` Dan Carpenter [this message]
2014-05-04  0:24 ` Greg KH

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=20140501105025.GZ4963@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=cengelma@gmx.at \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=oat.elena@gmail.com \
    /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.