From: Johannes Berg <johannes@sipsolutions.net>
To: Ola Olsson <ola1olsson@gmail.com>
Cc: linux-wireless@vger.kernel.org, Ola Olsson <ola.olsson@sonymobile.com>
Subject: Re: [PATCH] iw: Fix memory leak if nla_put fails
Date: Tue, 03 Nov 2015 11:28:45 +0100 [thread overview]
Message-ID: <1446546525.29010.14.camel@sipsolutions.net> (raw)
In-Reply-To: <1445639592-5559-1-git-send-email-ola1olsson@gmail.com> (sfid-20151024_003338_280380_D4EE8ED5)
On Sat, 2015-10-24 at 00:33 +0200, Ola Olsson wrote:
> The NLA_PUT macro will automatically goto nla_put_failure if
> the underlying nla_put fails. This will in turn leak our malloced
> memory in both the scan and wowlan commands.
> Fix that by not using the macro in the cases where we have
> allocated heap mem.
>
Applied, thanks.
Luckily the tool just exits right away so we don't have to care all
that much :)
But of course it's still good to fix it since people can (and do) copy
it into other code.
johannes
next prev parent reply other threads:[~2015-11-03 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 22:33 [PATCH] iw: Fix memory leak if nla_put fails Ola Olsson
2015-11-03 10:28 ` Johannes Berg [this message]
2015-11-07 11:36 Amit Khatri
2015-11-07 11:43 Amit Khatri
2015-11-27 9:37 [PATCH] iw:Fix " Rahul Jain
2016-01-06 11:11 ` 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=1446546525.29010.14.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=ola.olsson@sonymobile.com \
--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 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.