pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump: Set private_date pointer to NULL in callback
Date: Thu, 17 Apr 2025 10:59:51 +0000
Message-ID: <E1u5MyF-000TQm-0g@gemulon.postgresql.org> (raw)

pg_dump: Set private_date pointer to NULL in callback

The end callback for ZStandard compression frees the private_data
but didn't set the pointer to NULL after freeing.  This is not a
bug as the code is right now, since nothing is dereferencing the
pointer upon returning from the callback but it is good practice
to do.

Author: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/efaee52b-9550-44ca-8633-ea86076b3283@altlinux.org

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/compress_zstd.c | 1 +
1 file changed, 1 insertion(+)



Message-ID: <E1u5MyF-000TQm-0g@gemulon.postgresql.org>
Permalink:  ../E1u5MyF-000TQm-0g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u5MyF-000TQm-0g@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: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_dump: Set private_date pointer to NULL in callback
  In-Reply-To: <E1u5MyF-000TQm-0g@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