From b2452151931ffe98337181567aaf797c1f530c3f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 30 Dec 2015 16:05:52 +0000 Subject: core_tests: deinit core before destroying it This fixes a use after free by ioservice threads --- tests/core_tests/chaingen.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 822ccfb11..17b78da8e 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -498,7 +498,9 @@ inline bool do_replay_events(std::vector& events) return false; } t_test_class validator; - return replay_events_through_core(c, events, validator); + bool ret = replay_events_through_core(c, events, validator); + c.deinit(); + return ret; } //-------------------------------------------------------------------------- template -- cgit v1.2.3