mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Christian Engelmayer <cengelma@gmx.at>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	Larry.Finger@lwfinger.net, mguzik@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723au: fix potential leak in update_bcn_wps_ie()
Date: Fri, 02 May 2014 08:59:40 +0200	[thread overview]
Message-ID: <wrfj1twcwtr7.fsf@ultrasam.lan.trained-monkey.org> (raw)
In-Reply-To: <20140502001118.5ab306d8@spike> (Christian Engelmayer's message of "Fri, 2 May 2014 00:11:18 +0200")

Christian Engelmayer <cengelma@gmx.at> writes:
> Fix a potential leak in the error path of function update_bcn_wps_ie().
> Move the affected input verification to the beginning of the function so
> that it may return directly without leaking already allocated memory.
> Detected by Coverity - CID 1077718.
>
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> ---
> v2: Added change suggested by Mateusz Guzik:
>
>     Move the check before allocating the memory instead of freeing the
>     resource afterwards in the error path.
>
> Compile tested and applies against branch staging-next of tree
> git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> ---
>  drivers/staging/rtl8723au/core/rtw_ap.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Added to the 8723au tree

Thanks!

Jes

      reply	other threads:[~2014-05-02  6:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 22:11 Christian Engelmayer
2014-05-02  6:59 ` Jes Sorensen [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=wrfj1twcwtr7.fsf@ultrasam.lan.trained-monkey.org \
    --to=jes.sorensen@redhat.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=mguzik@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®