pgsql: Remove useless pstrdup() calls.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove useless pstrdup() calls.
Date: 2025-10-22 20:22:59
Message-ID: E1vBfMJ-0030Ao-1q@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-10-22 21:48:02 pgsql: Fix type of infomask parameter in htup_details.h functions.
Previous Message Tom Lane 2025-10-22 19:19:27 pgsql: Fix memory leaks in scripts/vacuuming.c.