pg_dump: Fix dangling pointer in EndCompressorZstd() - Mailing list pgsql-hackers

From Alexander Kuznetsov
Subject pg_dump: Fix dangling pointer in EndCompressorZstd()
Date
Msg-id efaee52b-9550-44ca-8633-ea86076b3283@altlinux.org
Whole thread Raw
Responses Re: pg_dump: Fix dangling pointer in EndCompressorZstd()
List pgsql-hackers
Hello everyone,

We've found that EndCompressorZstd() doesn't set cs->private_data to NULL after pg_free(),
unlike other EndCompressor implementations.
While this doesn't currently cause issues (as the pointer soon gets reassigned),
we recommend fixing this to maintain consistency with other implementations and prevent potential future issues.

The patch is attached, would appreciate your thoughts on this change.

--
Best regards,
Alexander Kuznetsov

Attachment

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: recoveryCheck test failure on flaviventris
Next
From: Jakub Wartak
Date:
Subject: NUMA shared memory interleaving