From f39ec2e7c8ccdbe0a48037ae5fe5f6f90b374db4 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 23 Dec 2007 22:08:47 +0100 Subject: [PATCH] If no config file is specified, pretend loading an empty configuration (i.e., create an empty transaction and commit it immediately). Otherwise, programs with NULL cf_def_file crash when given `-S'. --- lib/conf-input.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/conf-input.c b/lib/conf-input.c index b890295d..c5d25277 100644 --- a/lib/conf-input.c +++ b/lib/conf-input.c @@ -395,6 +395,11 @@ load_default(void) else if (cf_load(cf_def_file)) die("Cannot load default config %s", cf_def_file); } + else + { + // We need to create an empty pool + cf_journal_commit_transaction(1, cf_journal_new_transaction(1)); + } } static void -- 2.39.2