Remove useless pstrdup() calls.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Oct 2025 20:22:52 +0000 (16:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Oct 2025 20:22:52 +0000 (16:22 -0400)
commit716c451128a141acbae1ccab6946c716021a977f
tree87e2a9039cbe5ca6854404f69c668c91805c67ce
parentbc310c6ff3463c65ce532a437f1d27a4318c8b4a
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.
src/pl/plpython/plpy_elog.c
src/pl/plpython/plpy_plpymodule.c