From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix memory leak in PLySequence_ToJsonbValue()
Date: Fri, 15 Jun 2018 12:06:47 +0000
Message-ID: <E1fTnV9-0006fJ-QD@gemulon.postgresql.org> (raw)
Fix memory leak in PLySequence_ToJsonbValue()
PyObject returned from PySequence_GetItem() is not released. Similar code in PLyMapping_ToJsonbValue() is correct, because according to Python documentation
PyList_GetItem() and PyTuple_GetItem() return a borrowed reference while
PySequence_GetItem() returns new reference. contrib/jsonb_plpython is new
in PostgreSQL 11, no backpatch is needed.
Author: Nikita Glukhov
Discussion: https://postgr.es/m/6001af16-b242-2527-bc7e-84b8a959163b%40postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/dad8bed04ab98ada84ecd58ace6f59839aa161c4
Modified Files
--------------
contrib/jsonb_plpython/jsonb_plpython.c | 2 ++
1 file changed, 2 insertions(+)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org
Subject: Re: pgsql: Fix memory leak in PLySequence_ToJsonbValue()
In-Reply-To: <E1fTnV9-0006fJ-QD@gemulon.postgresql.org>
References: <E1fTnV9-0006fJ-QD@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox