mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
To: ext Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Trevor Keith <tsrk@tsrk.net>,
	Rusty Russell <rusty@rustcorp.com.au>,
	ext Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCHv4] fixed resource leak in scripts/mod/modpost.c
Date: Tue, 10 Aug 2010 15:40:28 +0300	[thread overview]
Message-ID: <1281444028.2063.542.camel@alex-desktop> (raw)
In-Reply-To: <AANLkTinCzXCAfrQ46N-AQAUVS_N4kT=p58b6GZR1AL47@mail.gmail.com>

On Tue, 2010-08-10 at 14:21 +0200, ext Andy Shevchenko wrote:
> On Tue, Aug 10, 2010 at 3:03 PM, Alexey Fomenko
> <ext-alexey.fomenko@nokia.com> wrote:
> > From: Alexey Fomenko <ext-alexey.fomenko@nokia.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@nokia.com>
> 
> > @@ -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,
> > -               sec2annotation(tosec), tosym, to_p);
> > +               from, prl_from, fromsym, from_p,
> > +               to, prl_to, tosym, to_p,
> > +               ptl_to, tosym, to_p);
> Did you ever compile this code?
> It looks typo here.
Ever - yes, last one - no, was in a hurry. Shouldn't have been.
I'll fix it.

> 
> > +               free(prl_from);
> > +               free(prl_to);
> >                break;
> >        case ANY_EXIT_TO_ANY_INIT:
> > +               prl_from = sec2annotation(fromsec);
> > +               prl_to = sec2annotation(tosec);
> >                fprintf(stderr,
> >                "The %s %s%s%s references\n"
> >                "a %s %s%s%s.\n"
> 



  reply	other threads:[~2010-08-10 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05 12:09 [PATCHv2] " Alexey Fomenko
2010-08-10  9:14 ` Andy Shevchenko
2010-08-10 10:52   ` [PATCHv3] " Alexey Fomenko
2010-08-10 11:35     ` Andy Shevchenko
2010-08-10 12:03       ` [PATCHv4] " Alexey Fomenko
2010-08-10 12:21         ` Andy Shevchenko
2010-08-10 12:40           ` Alexey Fomenko [this message]
     [not found]           ` <1281445771.2063.599.camel@alex-desktop>
2010-08-10 13:43             ` [PATCHv4] modpost: fixed resource leak in report_sec_mismatch() Andy Shevchenko

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=1281444028.2063.542.camel@alex-desktop \
    --to=ext-alexey.fomenko@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tsrk@tsrk.net \
    /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®