Re: pgsql: Fix memory leak in pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix memory leak in pgbench
Date: 2019-04-09 17:28:46
Message-ID: alpine.DEB.2.21.1904091919180.19300@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-09 17:46:53 Re: pgsql: Fix memory leak in pgbench
Previous Message Alvaro Herrera 2019-04-09 17:01:54 pgsql: Fix typo