pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
Date: Fri, 17 Apr 2020 01:47:13 +0000
Message-ID: <E1jPG65-0003rj-Bq@gemulon.postgresql.org> (raw)

Fix minor memory leak in pg_basebackup and pg_receivewal

The result of the query used to retrieve the WAL segment size from the
backend was not getting freed in two code paths.  Both pg_basebackup and
pg_receivewal exit immediately if a failure happened on this query, so
this was not an actual problem, but it could be an issue if this code
gets used for other tools in different ways, be they future tools in
this code tree or external, existing, ones.

Oversight in commit fc49e24, so backpatch down to 11.

Author: Jie Zhang
Discussion: https://postgr.es/m/970ad9508461469b9450b64027842331@G08CNEXMBPEKD06.g08.fujitsu.local
Backpatch-through: 11

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/198efe774b0d2065d828cf7822376a2871c671fc

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)



view thread (3+ messages)

Message-ID: <E1jPG65-0003rj-Bq@gemulon.postgresql.org>
Permalink:  ../E1jPG65-0003rj-Bq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jPG65-0003rj-Bq@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix minor memory leak in pg_basebackup and pg_receivewal
  In-Reply-To: <E1jPG65-0003rj-Bq@gemulon.postgresql.org>
  References: <E1jPG65-0003rj-Bq@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox