Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc95765f

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 toallocate memory for it again. We decide not to backpatch it as theredoesn't seem to be any case where it can create a meaningful leak.Author: Zhijie HouReviewed-by: Daniel GustafssonDiscussion:https://postgr.es/m/229fed2eb8c54c71a96ccb99e516eb12@G08CNEXMBPEKD05.g08.fujitsu.local
1 parentc9a0dc3 commitc95765f

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)

[8]ページ先頭

©2009-2025 Movatter.jp