[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=UfzGay5XQKMpPCZTSO5SJ1jDknqwayhrEZJO0@mail.gmail.com>
Date: Tue, 10 Aug 2010 14:35:48 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Alexey Fomenko <ext-alexey.fomenko@...ia.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Trevor Keith <tsrk@...k.net>,
Rusty Russell <rusty@...tcorp.com.au>,
ext Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCHv3] fixed resource leak in scripts/mod/modpost.c
On Tue, Aug 10, 2010 at 1:52 PM, Alexey Fomenko
<ext-alexey.fomenko@...ia.com> wrote:
> From: Alexey Fomenko <ext-alexey.fomenko@...ia.com>
>
> sec2annotation() returns malloc'ed buffer directly to printf as an
> argument. Patch lets free this buffer after printing. Preventing ops
> while freeing the buffer by changing return const str to return
> strdup empty line.
>
> Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@...ia.com>
> ---
> scripts/mod/modpost.c | 58 ++++++++++++++++++++++++++++++++++++------------
> 1 files changed, 42 insertions(+), 16 deletions(-)
>
> diff -ur linux-2.6.35/scripts/mod/modpost.c linux-2.6.35_b/scripts/mod/modpost.c
> --- linux-2.6.35/scripts/mod/modpost.c 2010-08-10 12:11:03.854528620 +0300
> +++ linux-2.6.35_b/scripts/mod/modpost.c 2010-08-10 12:11:25.174529109 +0300
> @@ -1165,9 +1165,9 @@
> strcat(p, "data ");
> else
> strcat(p, " ");
> - return r; /* we leak her but we do not care */
> + return r;
Here is the extra tail whitespace.
> @@ -1283,11 +1301,15 @@
> "uses functionality in the exit path.\n"
> "The fix is often to remove the %sannotation of\n"
> "%s%s so it may be used outside an exit section.\n",
> - from, sec2annotation(fromsec), fromsym, from_p,
> - to, sec2annotation(tosec), tosym, to_p,
> + from, prl_from, fromsym, from_p,
> + to, prl_to, tosym, to_p,
> sec2annotation(tosec), tosym, to_p);
^^^^^^^^^^^^^^^^^^^^^^ missed change
Acked-by: Andy Shevchenko <ext-andriy.shevchenko@...ia.com>
(after fixing above issues)
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists