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

From Fabien COELHO
Subject Re: pgsql: Fix memory leak in pgbench
Date
Msg-id alpine.DEB.2.21.1904091919180.19300@lancre
Whole thread Raw
In response to pgsql: Fix memory leak in pgbench  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Fix memory leak in pgbench
List pgsql-committers
Hello Alvaro,

> 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.

-- 
Fabien.



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Fix typo
Next
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Fix memory leak in pgbench