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

Commitc787016

Browse files
committed
The actual segfault was caused by a double pfree(), but ISTM that
failing to find pg_hba.conf should be a fatal error anyway, so Iincreased the priority of the elog() from LOG to FATAL and refactoredthe code a little bit.Neil Conway
1 parentfb2d7a2 commitc787016

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

‎src/backend/libpq/hba.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.91 2002/12/11 22:17:11 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.92 2002/12/14 18:49:37 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -845,16 +845,13 @@ load_hba(void)
845845
file=AllocateFile(conf_file,"r");
846846
if (file==NULL)
847847
{
848-
/* The open of the config file failed.*/
849-
elog(LOG,"load_hba: Unable to open authentication config file \"%s\": %m",
848+
elog(FATAL,
849+
"load_hba: Unable to open authentication config file \"%s\": %m",
850850
conf_file);
851-
pfree(conf_file);
852-
}
853-
else
854-
{
855-
hba_lines=tokenize_file(file);
856-
FreeFile(file);
857851
}
852+
853+
hba_lines=tokenize_file(file);
854+
FreeFile(file);
858855
pfree(conf_file);
859856
}
860857

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp