Fix memory leak in pg_restore with zstd-compressed data.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Dec 2024 03:31:26 +0000 (22:31 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Dec 2024 03:31:26 +0000 (22:31 -0500)
commit04b86019818067b32ce51883a3322f875d573d15
tree916e51db2f52287795009c76d027b4183ed1f3ed
parent18452b70acee293d709f475c4551b3b242d4abd1
Fix memory leak in pg_restore with zstd-compressed data.

EndCompressorZstd() neglected to free everything.  This was
most visible with a lot of large objects in the dump.

Per report from Tomasz Szypowski.  Back-patch to v16
where this code came in.

Discussion: https://postgr.es/m/DU0PR04MB94193D038A128EF989F922D199042@DU0PR04MB9419.eurprd04.prod.outlook.com
src/bin/pg_dump/compress_zstd.c