summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-12-14 18:49:43 +0000
committerBruce Momjian <bruce@momjian.us>2002-12-14 18:49:43 +0000
commit750b3f38255d3e9c5e6021a74224659d18533e1c (patch)
tree2e950d3d2bffb734c427c4b36fe21d348f7c4529 /src
parent96e95740377dac3e9bbbf4e9bb88fd630ce89074 (diff)
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.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 67da2f78adf..ea04cfc2bd9 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.87.2.1 2002/12/11 22:17:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.87.2.2 2002/12/14 18:49:43 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);
}