Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d3ee451

Browse files
committed
In json code, clean up temp memory contexts after processing.
Craig Ringer.
1 parent 3e8554a commit d3ee451

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/utils/adt/jsonfuncs.c

+4
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,8 @@ each_worker(PG_FUNCTION_ARGS, bool as_text)
972972

973973
pg_parse_json(lex, sem);
974974

975+
MemoryContextDelete(state->tmp_cxt);
976+
975977
rsi->setResult = state->tuple_store;
976978
rsi->setDesc = state->ret_tdesc;
977979

@@ -1154,6 +1156,8 @@ elements_worker(PG_FUNCTION_ARGS, bool as_text)
11541156

11551157
pg_parse_json(lex, sem);
11561158

1159+
MemoryContextDelete(state->tmp_cxt);
1160+
11571161
rsi->setResult = state->tuple_store;
11581162
rsi->setDesc = state->ret_tdesc;
11591163

0 commit comments

Comments
 (0)