pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix memory leaks in pg_combinebackup/reconstruct.c.
Date: Wed, 22 Oct 2025 17:38:58 +0000
Message-ID: <E1vBcna-002yvx-1B@gemulon.postgresql.org> (raw)

Fix memory leaks in pg_combinebackup/reconstruct.c.

One code path forgot to free the separately-malloc'd filename
part of a struct rfile.  Another place freed the filename but
forgot the struct rfile itself.  These seem worth fixing because
with a large backup we could be dealing with many files.

Coverity found the bug in make_rfile().  I found the other one
by manual inspection.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9224c3025243a3daeb49fa58b948c6e1fdf99501

Modified Files
--------------
src/bin/pg_combinebackup/reconstruct.c | 2 ++
1 file changed, 2 insertions(+)



view thread (3+ messages)  latest in thread

Message-ID: <E1vBcna-002yvx-1B@gemulon.postgresql.org>
Permalink:  ../E1vBcna-002yvx-1B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vBcna-002yvx-1B@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix memory leaks in pg_combinebackup/reconstruct.c.
  In-Reply-To: <E1vBcna-002yvx-1B@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