Skip to content

Commit c95765f

Browse files
author
Amit Kapila
committed
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
1 parent c9a0dc3 commit c95765f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/subscriptioncmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
12671267
relname = TextDatumGetCString(slot_getattr(slot, 2, &isnull));
12681268
Assert(!isnull);
12691269

1270-
rv = makeRangeVar(pstrdup(nspname), pstrdup(relname), -1);
1270+
rv = makeRangeVar(nspname, relname, -1);
12711271
tablelist = lappend(tablelist, rv);
12721272

12731273
ExecClearTuple(slot);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy