Hi,
The commit: Revert SQL/JSON features
https://github.com/postgres/postgres/commit/2f2b18bd3f554e96a8cc885b177211be12288e4a
Left a little oversight.
I believe it will be properly corrected when it is applied again.
However, for Postgres 15 this may can cause a small memory leak.
Attached a fix patch.
regards,
Ranier Vilela