diff options
author | Amit Kapila | 2021-01-16 04:45:32 +0000 |
---|---|---|
committer | Amit Kapila | 2021-01-16 04:45:32 +0000 |
commit | c95765f47673b16ed36acbfe98e1242e3c3822a3 (patch) | |
tree | ee3a04ede5c0b52c4db5a28ea75b4212a0d13577 | |
parent | c9a0dc34865f2f82d8e186f534d9b605afaa4d11 (diff) |
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
-rw-r--r-- | src/backend/commands/subscriptioncmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 490e9355413..082f7855b89 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -1267,7 +1267,7 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications) relname = TextDatumGetCString(slot_getattr(slot, 2, &isnull)); Assert(!isnull); - rv = makeRangeVar(pstrdup(nspname), pstrdup(relname), -1); + rv = makeRangeVar(nspname, relname, -1); tablelist = lappend(tablelist, rv); ExecClearTuple(slot); |