Re: BUG #16190: The usage of NULL pointer in refint.c

Michael Paquier <[email protected]> Mon, 6 Jan 2020 15:49:18 +0900
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <[email protected]>
--tRcR9GoWqjXrt11v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Jan 06, 2020 at 01:21:35AM -0500, Tom Lane wrote:
> Yeah, if somebody wanted to fix this, the right way is to replace
> these malloc calls with pallocs.  Some investigation would be needed
> about which context to use.

It seems to me that this would be TopMemoryContext.  All the plans
used for the checks are kept within the context of the session.
--
Michael

--tRcR9GoWqjXrt11v
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4S2G4ACgkQnvQgOdby
QH3Rgw//UUmvGl9pB2mq1mbLuX2cnIC6Ej5bsHN9QfZ3LUliNdH/U+nPAuSOVz+W
ZzluHPHan0LJp1XG068M/sqNH4hm1jOqLrwiCxLlnMNKvSmkJxUUCdi8qE0C4FAf
MdNOIgcVj2ukn4JPfM+d8+Vlw3Qelco3Fx159jvmKlX0Ic+/nAY/v7fLMCKU33MK
lMTMrVuhb5bpRc2D0K0AhFoWVaD7/wTuyh3F0TJO2Rhc98eFYtf3CebyCxtBn3/P
lTzhPg/fhVTCO6fDIa3vEhwk6Hu1kkH90yTCj43sub9XqBPVNfurDZx/QczdclgZ
PZbVg1CTo/AFFEqeOmnEQn7g+KXFO+MZVD7XG/3rBj+LOyAeg1JMrAT5eGFa4STP
o/DzagOHELYRj50UWjXQKlw4EYFsVBsCzd74sJw49wap5K6QpojYzhQwKhd11BCO
HAhZu1kHuFkSjLLgj7YpkyJUg1yyu/DskP2ShDQnmCYu2Ys95Lw7ERZZDAJCdbLJ
Yy70UwYGadtx1KLFcstBBtjk/VU1LzQc6y86Xbv8ZMRwqxpPcMDlOBF47etiXIvR
Mdy+dTYxf1b7YOavQKnYGfHhgBMPBjrON+rw1ODSlY7IPI2G4ZVie6TPo8yQ8Jpi
dNgC6Szdp3/1dEPAr6/Yr4k9aT7iQsa9lCav57aw1IugQ7FR29Q=
=yyUU
-----END PGP SIGNATURE-----

--tRcR9GoWqjXrt11v--