core_tests: deinit core before destroying it

This fixes a use after free by ioservice threads
This commit is contained in:
moneromooo-monero 2015-12-30 16:05:52 +00:00
parent bc8a52efd8
commit b245215193
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -498,7 +498,9 @@ inline bool do_replay_events(std::vector<test_event_entry>& events)
return false; return false;
} }
t_test_class validator; 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> template<class t_test_class>