From: Johannes Berg <johannes@sipsolutions.net>
To: Ola Olsson <ola1olsson@gmail.com>, James Cameron <quozl@laptop.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iw: Memory leak in error condition
Date: Thu, 08 Oct 2015 11:37:24 +0200 [thread overview]
Message-ID: <1444297044.2131.16.camel@sipsolutions.net> (raw)
In-Reply-To: <CABAco3Dd7urHu+y7J8TKYOXgh1QjRDvAp_Rs=q_gsU3f6Oum8Q@mail.gmail.com> (sfid-20151001_012741_497176_47BF5EB7)
On Thu, 2015-10-01 at 01:27 +0200, Ola Olsson wrote:
> Oh yes! :)
> Suddenly valgrind was happy as well.
>
> From 2724dd259f2bf61a2b7c85a70a70fd640a583453 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>
This got picked up as a new patch by patchwork, but please resend.
As I mentioned on the other patch, you have whitespace issues (tabs
replaced by space, so the patch doesn't apply)
Also, on this particular patch you forgot the Signed-off-by.
Please also reword the subject to indicate that you fixed something, it
seems a bit strange to me to write just "memory leak" :)
Your "MHZ" patch also has the same whitespace issues, while the if.h
patch applied fine (though it wasn't changing any indented code, so
whitespace wouldn't have mattered)
Please resend this patch, the return values one and the MHz one.
Thanks,
johannes
> ---
> scan.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/scan.c b/scan.c
> index e959c1b..f3441a7 100644
> --- a/scan.c
> +++ b/scan.c
> @@ -445,8 +445,11 @@ static int handle_scan(struct nl80211_state
> *state,
>
> if (ies || meshid) {
> tmpies = (unsigned char *) malloc(ies_len +
> meshid_len);
> - if (!tmpies)
> + if (!tmpies) {
> + free(ies);
> + free(meshid);
> goto nla_put_failure;
> + }
> if (ies) {
> memcpy(tmpies, ies, ies_len);
> free(ies);
prev parent reply other threads:[~2015-10-08 9:37 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
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 [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=1444297044.2131.16.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=ola1olsson@gmail.com \
--cc=quozl@laptop.org \
/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).