diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-12-14 18:49:37 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-12-14 18:49:37 +0000 |
commit | c78701697c04564ffe976496ffcdb0fd396fae30 (patch) | |
tree | 62d8db8c36af7ee612020e89827eb40cf06b41ad /src | |
parent | fb2d7a24f9769f5a22747ac821b67eb5f9dd61be (diff) | |
download | postgresql-c78701697c04564ffe976496ffcdb0fd396fae30.tar.gz postgresql-c78701697c04564ffe976496ffcdb0fd396fae30.zip |
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 I
increased the priority of the elog() from LOG to FATAL and refactored
the code a little bit.
Neil Conway
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/hba.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 46fa3084514..185093fb633 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.91 2002/12/11 22:17:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.92 2002/12/14 18:49:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -845,16 +845,13 @@ load_hba(void) file = AllocateFile(conf_file, "r"); if (file == NULL) { - /* The open of the config file failed. */ - elog(LOG, "load_hba: Unable to open authentication config file \"%s\": %m", + elog(FATAL, + "load_hba: Unable to open authentication config file \"%s\": %m", conf_file); - pfree(conf_file); - } - else - { - hba_lines = tokenize_file(file); - FreeFile(file); } + + hba_lines = tokenize_file(file); + FreeFile(file); pfree(conf_file); } |