Re: pg_dump: Fix dangling pointer in EndCompressorZstd()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, kuznetsovam@altlinux.org, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, egori@altlinux.org, nickel@altlinux.org
Date: 2025-04-16T22:29:53Z
Lists: pgsql-hackers
On Wed, Apr 16, 2025 at 04:19:02PM +0200, Daniel Gustafsson wrote:
> Agreed, while it's perfectly safe today the end method should not make
> assumptions about the use of the private_data pointer upon return and should
> leave it set to NULL.

Indeed.  I was just looking at applying what Alexander has sent
because what EndCompressorZstd() not doing what the other methods do
makes no sense.  Perhaps you are already on it, Daniel?
--
Michael

Commits

  1. pg_dump: Set private_date pointer to NULL in callback