From 3a157c679247b95057a2d1260241429baf0c55e0 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 23 Feb 2006 23:42:33 +0000 Subject: Fail properly when reading a config file failed. --- common/config-parser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/config-parser.c') diff --git a/common/config-parser.c b/common/config-parser.c index f303abe..23f57a4 100644 --- a/common/config-parser.c +++ b/common/config-parser.c @@ -125,6 +125,9 @@ cfg_parse_file(const char* filename, void* data, char** memory) ASSERT(filename); config = read_config_file(filename, data); + if(!config) + goto finally; + next = config; /* Go through lines and process them */ -- cgit v1.2.3