linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Cameron <quozl@laptop.org>
To: Ola Olsson <ola1olsson@gmail.com>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iw: Memory leak in error condition
Date: Thu, 1 Oct 2015 09:16:13 +1000	[thread overview]
Message-ID: <20150930231613.GC20220@us.netrek.org> (raw)
In-Reply-To: <CABAco3AMgZSv9kCYkE6yQDcDE0+-7rA4ZzYazxSqAS99LHHMGQ@mail.gmail.com>

On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
> >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
> From: Ola Olsson <ola.olsson@sonymobile.com>
> Date: Thu, 1 Oct 2015 00:43:06 +0200
> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
>  Olsson <ola.olsson@sonymobile.com>
> 
> ---
>  scan.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scan.c b/scan.c
> index e959c1b..f248981 100644
> --- a/scan.c
> +++ b/scan.c
> @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
>         if (ies || meshid) {
>                 tmpies = (unsigned char *) malloc(ies_len + meshid_len);
>                 if (!tmpies)
> +                       free(ies);
> +                       free(meshid);
>                         goto nla_put_failure;

Braces?  { }


>                 if (ies) {
>                         memcpy(tmpies, ies, ies_len);
> -- 
> 1.7.9.5
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
James Cameron
http://quozl.linux.org.au/

  reply	other threads:[~2015-09-30 23:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 23:01 [PATCH] iw: Memory leak in error condition Ola Olsson
2015-09-30 23:16 ` James Cameron [this message]
2015-09-30 23:27   ` Ola Olsson
2015-09-30 23:34     ` Julian Calaby
2015-09-30 23:39       ` Ola Olsson
2015-09-30 23:40         ` Julian Calaby
2015-10-08  9:37     ` Johannes Berg

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=20150930231613.GC20220@us.netrek.org \
    --to=quozl@laptop.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ola1olsson@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 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).