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: pg_amcheck: Fix inconsistency in memory freeing
Date: Thu, 27 Feb 2025 05:06:57 +0000
Message-ID: <E1tnW6p-000IJz-2W@gemulon.postgresql.org> (raw)

pg_amcheck: Fix inconsistency in memory freeing

The function in charge of freeing the memory from a result created by
PQescapeIdentifier() has to be PQfreemem(), to ensure that both
allocation and free come from libpq, but one spot in pg_amcheck was
missing that.

Oversight in b859d94c6389.

Author: Ranier Vilela <ranier.vf@gmail.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Discussion: https://postgr.es/m/CAEudQArD_nKSnYCNUZiPPsJ2tNXgRmLbXGSOrH1vpOF_XtP0Vg@mail.gmail.com
Discussion: https://postgr.es/m/CAEudQArbTWVSbxq608GRmXJjnNSQ0B6R7CSffNnj2hPWMUsRNg@mail.gmail.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/48e4ae9a0707b22cf874a4e8e531a07077318424

Modified Files
--------------
src/bin/pg_amcheck/pg_amcheck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1tnW6p-000IJz-2W@gemulon.postgresql.org>
Permalink:  ../E1tnW6p-000IJz-2W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tnW6p-000IJz-2W@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_amcheck: Fix inconsistency in memory freeing
  In-Reply-To: <E1tnW6p-000IJz-2W@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