From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix tiny memory leaks
Date: Sat, 01 Oct 2022 10:52:05 +0000
Message-ID: <E1oea6G-000Q0j-HW@gemulon.postgresql.org> (raw)
Fix tiny memory leaks
Both check_application_name() and check_cluster_name() use
pg_clean_ascii() but didn't release the memory. Depending on when the
GUC is set, this might be cleaned up at some later time or it would
leak postmaster memory once. In any case, it seems better not to have
to rely on such analysis and make the code locally robust. Also, this
makes Valgrind happier.
Author: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Jacob Champion <jchampion@timescale.com>
Discussion: https://www.postgresql.org/message-id/CAD21AoBmFNy9MPfA0UUbMubQqH3AaK5U3mrv6pSeWrwCk3LJ8g@mail.gmail...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a9d58bfe8a3ae2254e1553ab76974feeaafa0133
Modified Files
--------------
src/backend/commands/variable.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
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: peter@eisentraut.org
Subject: Re: pgsql: Fix tiny memory leaks
In-Reply-To: <E1oea6G-000Q0j-HW@gemulon.postgresql.org>
References: <E1oea6G-000Q0j-HW@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