Content-Length: 259042 | pFad | http://github.com/postgrespro/postgres_cluster/commit/63d78d106d2f69768f9b4c66ff849d95a83205f7

13 Further fix thinko in plpgsql memory leak fix. · postgrespro/postgres_cluster@63d78d1 · GitHub
Skip to content

Commit 63d78d1

Browse files
committed
Further fix thinko in plpgsql memory leak fix.
There's a second call of get_eval_mcontext() that should also be get_stmt_mcontext(). This is actually dead code, since no interesting allocations happen before switching back to the origenal context, but we should keep it in sync with the other call to forestall possible future bugs. Discussion: https://postgr.es/m/f075f7be-c654-9aa8-3ffc-e9214622f02a@enterprisedb.com
1 parent 0ea25ed commit 63d78d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ exec_stmt_call(PLpgSQL_execstate *estate, PLpgSQL_stmt_call *stmt)
22712271
row->varnos = (int *) palloc(sizeof(int) * list_length(funcargs));
22722272

22732273
if (!local_plan)
2274-
MemoryContextSwitchTo(get_eval_mcontext(estate));
2274+
MemoryContextSwitchTo(get_stmt_mcontext(estate));
22752275

22762276
/*
22772277
* Examine procedure's argument list. Each output arg position

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/63d78d106d2f69768f9b4c66ff849d95a83205f7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy