pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid memory leak on error while parsing pg_stat_statements dump
Date: Fri, 27 Mar 2026 11:12:06 +0000
Message-ID: <E1w656j-001gdB-0Z@gemulon.postgresql.org> (raw)

Avoid memory leak on error while parsing pg_stat_statements dump file

By using palloc() instead of raw malloc().

Reported-by: Gaurav Singh <gaurav.singh@yugabyte.com>
Reviewed-by: Lukas Fittl <lukas@fittl.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/CAEcQ1bYR9s4eQLFDjzzJHU8fj-MTbmRpW-9J-r2gsCn+HEsynw@mail.gmail...
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a6d03067ff5d2198caf4805882dcdbe813a55817

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1w656j-001gdB-0Z@gemulon.postgresql.org>
Permalink:  ../E1w656j-001gdB-0Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w656j-001gdB-0Z@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: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid memory leak on error while parsing pg_stat_statements dump
  In-Reply-To: <E1w656j-001gdB-0Z@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