From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Robustify tuplesort's free_sort_tuple function
Date: Tue, 13 Jul 2021 01:28:04 +0000
Message-ID: <E1m37DQ-0006te-RZ@gemulon.postgresql.org> (raw)
Robustify tuplesort's free_sort_tuple function
41469253e went to the trouble of removing a theoretical bug from
free_sort_tuple by checking if the tuple was NULL before freeing it. Let's
make this a little more robust by also setting the tuple to NULL so that
should we be called again we won't end up doing a pfree on the already
pfree'd tuple. Per advice from Tom Lane.
Discussion: https://postgr.es/m/3188192.1626136953@sss.pgh.pa.us
Backpatch-through: 9.6, same as 41469253e
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a92709fed63428a711f36270a2b4bee039399d60
Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 1 +
1 file changed, 1 insertion(+)
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: drowley@postgresql.org
Subject: Re: pgsql: Robustify tuplesort's free_sort_tuple function
In-Reply-To: <E1m37DQ-0006te-RZ@gemulon.postgresql.org>
References: <E1m37DQ-0006te-RZ@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