浏览代码

Restoring the original core configuration during exiting that
makes the config variables available for farther function calls.
Closes SER-349

Miklos Tirpak 17 年之前
父节点
当前提交
5174bbf359
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      main.c

+ 4 - 0
main.c

@@ -476,6 +476,10 @@ void cleanup(show_status)
 #ifdef USE_DST_BLACKLIST
 	destroy_dst_blacklist();
 #endif
+	/* restore the original core configuration before the
+	 * config block is freed, otherwise even logging is unusable,
+	 * it can case segfault */
+	core_cfg = &default_core_cfg;
 	cfg_destroy();
 #ifdef USE_TCP
 	destroy_tcp();