Browse Source

fix crash in carrierroute related to failed config file loading

Henning Westerholt 16 years ago
parent
commit
6fc84149d6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/carrierroute/cr_config.c

+ 4 - 0
modules/carrierroute/cr_config.c

@@ -104,6 +104,10 @@ static cfg_t * parse_config(void) {
 	                   };
 
 	cfg = cfg_init(opts, CFGF_NONE);
+	if (cfg == NULL) {
+		LM_ERR("could not initialize configuration\n");
+		return NULL;
+	}
 
 	cfg_set_error_function(cfg, conf_error);