mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
In json code, clean up temp memory contexts after processing.
Craig Ringer.
This commit is contained in:
@ -972,6 +972,8 @@ each_worker(PG_FUNCTION_ARGS, bool as_text)
|
|||||||
|
|
||||||
pg_parse_json(lex, sem);
|
pg_parse_json(lex, sem);
|
||||||
|
|
||||||
|
MemoryContextDelete(state->tmp_cxt);
|
||||||
|
|
||||||
rsi->setResult = state->tuple_store;
|
rsi->setResult = state->tuple_store;
|
||||||
rsi->setDesc = state->ret_tdesc;
|
rsi->setDesc = state->ret_tdesc;
|
||||||
|
|
||||||
@ -1154,6 +1156,8 @@ elements_worker(PG_FUNCTION_ARGS, bool as_text)
|
|||||||
|
|
||||||
pg_parse_json(lex, sem);
|
pg_parse_json(lex, sem);
|
||||||
|
|
||||||
|
MemoryContextDelete(state->tmp_cxt);
|
||||||
|
|
||||||
rsi->setResult = state->tuple_store;
|
rsi->setResult = state->tuple_store;
|
||||||
rsi->setDesc = state->ret_tdesc;
|
rsi->setDesc = state->ret_tdesc;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user