mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
In json code, clean up temp memory contexts after processing.
Craig Ringer.
This commit is contained in:
parent
1c97ab9251
commit
cdfbb78f04
@ -958,6 +958,8 @@ each_worker(PG_FUNCTION_ARGS, bool as_text)
|
||||
|
||||
pg_parse_json(lex, sem);
|
||||
|
||||
MemoryContextDelete(state->tmp_cxt);
|
||||
|
||||
rsi->setResult = state->tuple_store;
|
||||
rsi->setDesc = state->ret_tdesc;
|
||||
|
||||
@ -1125,6 +1127,8 @@ json_array_elements(PG_FUNCTION_ARGS)
|
||||
|
||||
pg_parse_json(lex, sem);
|
||||
|
||||
MemoryContextDelete(state->tmp_cxt);
|
||||
|
||||
rsi->setResult = state->tuple_store;
|
||||
rsi->setDesc = state->ret_tdesc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user