Re: pgsql: Fix memory leak in pgbench - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Fix memory leak in pgbench
Date
Msg-id 20190409174653.GA14889@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: Fix memory leak in pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-committers
Hello

On 2019-Apr-09, Fabien COELHO wrote:

> > Fix memory leak in pgbench
> 
> > Commit 25ee70511ec2 introduced a memory leak in pgbench: some PGresult
> > structs were not being freed during error bailout, because we're now
> > doing more PQgetResult() calls than previously.
> 
> Indeed, I did not consider cleaning up on errors when removing cset, and if
> errors are handled somehow it would have caused a problem.
> 
> Thanks for the fix. I could have prepared a patch if told that there was
> some problem, but it seems that pg coverity reports are private.

They're indeed private.  In this case I could have opened it, since the
code is unreleased thus there's no security restriction, but since it's
so minor I didn't think it worthwhile.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-committers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgsql: Fix memory leak in pgbench
Next
From: Tom Lane
Date:
Subject: pgsql: Prevent inlining of multiply-referenced CTEs with outerrecursiv