From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove useless pstrdup() calls.
Date: Wed, 22 Oct 2025 20:22:59 +0000
Message-ID: <E1vBfMJ-0030Ao-1q@gemulon.postgresql.org> (raw)
Remove useless pstrdup() calls.
The result of PLyUnicode_AsString is already palloc'd,
so pstrdup'ing it is just a waste of time and memory.
More importantly it might confuse people about whether
that's necessary. Doesn't seem important enough to
back-patch, but we should fix it. Spotted by Coverity.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/716c451128a141acbae1ccab6946c716021a977f
Modified Files
--------------
src/pl/plpython/plpy_elog.c | 2 +-
src/pl/plpython/plpy_plpymodule.c | 4 ++--
2 files changed, 3 insertions(+), 3 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove useless pstrdup() calls.
In-Reply-To: <E1vBfMJ-0030Ao-1q@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