The following bug has been logged on the website:
Bug reference: 17422
Logged by: Vitaly Stoyan
Email address: vitstn(at)gmail(dot)com
PostgreSQL version: 13.6
Operating system: any
Description:
https://github.com/postgres/postgres/blob/REL_13_STABLE/src/backend/utils/adt/json.c#L83
It seems memory allocated by palloc for lex variable isn't freed