pgsql: Remove unnecessary pstrdup in fetch_table_list.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove unnecessary pstrdup in fetch_table_list.
Date: 2021-01-16 04:44:34
Message-ID: E1l0dRy-0004ZB-KC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove unnecessary pstrdup in fetch_table_list.

The result of TextDatumGetCString is already palloc'ed so we don't need to
allocate memory for it again. We decide not to backpatch it as there
doesn't seem to be any case where it can create a meaningful leak.

Author: Zhijie Hou
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/229fed2eb8c54c71a96ccb99e516eb12@G08CNEXMBPEKD05.g08.fujitsu.local

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c95765f47673b16ed36acbfe98e1242e3c3822a3

Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2021-01-16 20:22:19 pgsql: Prevent excess SimpleLruTruncate() deletion.
Previous Message Tomas Vondra 2021-01-15 22:50:49 pgsql: Disallow CREATE STATISTICS on system catalogs