소스 검색

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
 #ifdef USE_DST_BLACKLIST
 	destroy_dst_blacklist();
 	destroy_dst_blacklist();
 #endif
 #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();
 	cfg_destroy();
 #ifdef USE_TCP
 #ifdef USE_TCP
 	destroy_tcp();
 	destroy_tcp();