public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org, Arkadiusz Hiler <arek@hiler.eu>
Subject: Re: [igt-dev] [PATCH i-g-t] runner: Fix a memory leak in stderr_contains_warnings
Date: Mon, 14 Nov 2022 16:06:42 +0200	[thread overview]
Message-ID: <Y3JLcgTIBkTZWdUV@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <Y3JKqlSxLdgqcPFc@kamilkon-desk1>

On Mon, Nov 14, 2022 at 03:03:22PM +0100, Kamil Konieczny wrote:
> Hi,
> 
> On 2022-11-11 at 10:05:29 +0200, Petri Latvala wrote:
> > The matches object's internals weren't released.
> > 
> > Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> > Cc: Arkadiusz Hiler <arek@hiler.eu>
> > Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> > ---
> >  runner/resultgen.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/runner/resultgen.c b/runner/resultgen.c
> > index 3d753828..21a3ed84 100644
> > --- a/runner/resultgen.c
> > +++ b/runner/resultgen.c
> > @@ -1912,6 +1912,8 @@ static bool stderr_contains_warnings(const char *beg, const char *end)
> >  		i++;
> >  	}
> >  
> > +	free_matches(&matches);
> > +
> >  	return false;
> 
> On second look you need to free it also before return true ?
> So maybe reformat it, use break and then 'return found;' ?

Ah, well caught! v2 inc.


-- 
Petri Latvala

  reply	other threads:[~2022-11-14 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  8:05 [igt-dev] [PATCH i-g-t] runner: Fix a memory leak in stderr_contains_warnings Petri Latvala
2022-11-11  8:58 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-11-12  2:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-11-14 12:52 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2022-11-14 14:03 ` Kamil Konieczny
2022-11-14 14:06   ` Petri Latvala [this message]
2022-11-14 14:10 ` [igt-dev] [PATCH i-g-t v2] " Petri Latvala
2022-11-14 15:18 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Fix a memory leak in stderr_contains_warnings (rev2) Patchwork
2022-11-14 20:50 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=Y3JLcgTIBkTZWdUV@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=arek@hiler.eu \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.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