aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/chaingen.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-30 16:05:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-12-30 16:05:52 +0000
commitb2452151931ffe98337181567aaf797c1f530c3f (patch)
treeb5c391a246f488d0ca51ff8d01ddbfa6e01f7370 /tests/core_tests/chaingen.h
parentwallet: add a rescan_bc command and rescan_blockchain RPC (diff)
downloadmonero-b2452151931ffe98337181567aaf797c1f530c3f.tar.xz
core_tests: deinit core before destroying it
This fixes a use after free by ioservice threads
Diffstat (limited to 'tests/core_tests/chaingen.h')
-rw-r--r--tests/core_tests/chaingen.h4
1 files changed, 3 insertions, 1 deletions
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<test_event_entry>& events)
return false;
}
t_test_class validator;
- return replay_events_through_core<t_test_class>(c, events, validator);
+ bool ret = replay_events_through_core<t_test_class>(c, events, validator);
+ c.deinit();
+ return ret;
}
//--------------------------------------------------------------------------
template<class t_test_class>