diff options
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r-- | src/backend/utils/adt/jsonfuncs.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index f92861d8d29..4b5007e0d6f 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -535,7 +535,6 @@ jsonb_object_keys(PG_FUNCTION_ARGS) { FuncCallContext *funcctx; OkeysState *state; - int i; if (SRF_IS_FIRSTCALL()) { @@ -598,12 +597,6 @@ jsonb_object_keys(PG_FUNCTION_ARGS) SRF_RETURN_NEXT(funcctx, CStringGetTextDatum(nxt)); } - /* cleanup to reduce or eliminate memory leaks */ - for (i = 0; i < state->result_count; i++) - pfree(state->result[i]); - pfree(state->result); - pfree(state); - SRF_RETURN_DONE(funcctx); } @@ -706,7 +699,6 @@ json_object_keys(PG_FUNCTION_ARGS) { FuncCallContext *funcctx; OkeysState *state; - int i; if (SRF_IS_FIRSTCALL()) { @@ -755,12 +747,6 @@ json_object_keys(PG_FUNCTION_ARGS) SRF_RETURN_NEXT(funcctx, CStringGetTextDatum(nxt)); } - /* cleanup to reduce or eliminate memory leaks */ - for (i = 0; i < state->result_count; i++) - pfree(state->result[i]); - pfree(state->result); - pfree(state); - SRF_RETURN_DONE(funcctx); } |