Skip to content
Snippets Groups Projects
Commit d3ee4515 authored by Andrew Dunstan's avatar Andrew Dunstan
Browse files

In json code, clean up temp memory contexts after processing.

Craig Ringer.
parent 3e8554a5
No related branches found
No related tags found
No related merge requests found
...@@ -972,6 +972,8 @@ each_worker(PG_FUNCTION_ARGS, bool as_text) ...@@ -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) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment