From c990a38bac73f158715c17d49544bc93d94c3ea6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 4 Mar 2009 12:32:32 +0100 Subject: [PATCH] Config: When cf_getopt() reports an error, do not commit config. In such situations, the configuration sections need not be initialized properly. --- ucw/conf-input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ucw/conf-input.c b/ucw/conf-input.c index e0ef334d..fed6a828 100644 --- a/ucw/conf-input.c +++ b/ucw/conf-input.c @@ -499,9 +499,10 @@ cf_getopt(int argc, char * const argv[], const char *short_opts, const struct op #endif } else { /* unhandled option or end of options */ - if (res != ':' && res != '?') + if (res != ':' && res != '?') { load_default(); - final_commit(); + final_commit(); + } other_options++; return res; } -- 2.39.2