Avoid Python memory leaks in hstore_plpython and jsonb_plpython.
Tom Lane <tgl@sss.pgh.pa.us>
Avoid Python memory leaks in hstore_plpython and jsonb_plpython. Fix some places where we might fail to do Py_DECREF() on a Python object (thereby leaking it for the rest of the session). Almost all of the risks were in error-recovery paths, which we don't really expect to hit anyway. Hence, while this is definitely a bug fix, it doesn't quite seem worth back-patching. Nikita Glukhov, Michael Paquier, Tom Lane Discussion: https://postgr.es/m/28053a7d-10d8-fc23-b05c-b4749c873f63@postgrespro.ru
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore_plpython/hstore_plpython.c | modified | +6 −5 |
| contrib/jsonb_plpython/jsonb_plpython.c | modified | +77 −31 |
Discussion
- Fix memleaks and error handling in jsonb_plpython 7 messages · 2019-03-01 → 2019-04-07