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

Lines changed: 4 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy