Browse code

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

Miklos Tirpak authored on 03/01/2008 10:30:55
Showing 1 changed files
... ...
@@ -476,6 +476,10 @@ void cleanup(show_status)
476 476
 #ifdef USE_DST_BLACKLIST
477 477
 	destroy_dst_blacklist();
478 478
 #endif
479
+	/* restore the original core configuration before the
480
+	 * config block is freed, otherwise even logging is unusable,
481
+	 * it can case segfault */
482
+	core_cfg = &default_core_cfg;
479 483
 	cfg_destroy();
480 484
 #ifdef USE_TCP
481 485
 	destroy_tcp();