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

Commitd368a30

Browse files
committed
pg_receivexlog - Exit on failure to parse
In streamutil.c:GetConnection(), upgrade failure to parse theconnection string to an exit(1) instead of simply returning NULL.Most callers already immediately exited, but pg_receivexlog wouldloop on this case, continually trying to re-parse the connectionstring (which can't be changed after pg_receivexlog has started).GetConnection() was already expected to exit(1) in some cases(eg: failure to allocate memory or if unable to determine theinteger_datetimes flag), so this change shouldn't surprise anyone.Began looking at this due to the Coverity scanner complaining thatwe were leaking err_msg in this case- no longer an issue since wejust exit(1) immediately.
1 parent234e4cf commitd368a30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/bin/pg_basebackup/streamutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ GetConnection(void)
5757
if (conn_opts==NULL)
5858
{
5959
fprintf(stderr,"%s: %s\n",progname,err_msg);
60-
returnNULL;
60+
exit(1);
6161
}
6262

6363
for (conn_opt=conn_opts;conn_opt->keyword!=NULL;conn_opt++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp