Re: Potential memory leak in contrib/intarray's g_intbig_compress
Matthias van de Meent <boekewurm+postgres@gmail.com>
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Konstantin Knizhnik <knizhnik@garret.ru>
Date: 2023-08-02T11:44:42Z
Lists: pgsql-hackers
On Fri, 14 Jul 2023 at 07:57, Michael Paquier <michael@paquier.xyz> wrote: > > On Thu, Jul 13, 2023 at 06:28:39PM +0200, Matthias van de Meent wrote: > > There are similar pfree calls in the _int_gist.c file's g_int_compress > > function, which made me think we do need to clean up after use, but > > indeed these pfrees are useless (or even harmful if bug #17888 can be > > trusted) > > Indeed, all these are in a GiST temporary context. So you'd mean > something like the attached perhaps, for both the decompress and > compress paths? Yes, looks good to me. Thanks! Kind regards, Matthias van de Meent Neon (https://neon.tech)
Commits
-
Remove unnecessary pfree() in g_intbig_compress().
- 9f70f6d4c5bc 11.21 landed
- 8d8f3714988b 12.16 landed
- 7fffcc2ee910 13.12 landed
- a6991f763df8 14.9 landed
- 5cb4619896d8 15.4 landed
- e27f3f52c289 16.0 landed
- 8aac9759bb85 17.0 landed