Clearing roots after thread has joined to avoid a use-after-free situation.
Boost multi_index iterators remain valid on insertion but not after erasure.
This commit is contained in:
parent
f15b16e7fb
commit
c8245e83d9
1 changed files with 1 additions and 1 deletions
|
@ -3007,13 +3007,13 @@ void rai::active_transactions::stop ()
|
|||
condition.wait (lock);
|
||||
}
|
||||
stopped = true;
|
||||
roots.clear ();
|
||||
condition.notify_all ();
|
||||
}
|
||||
if (thread.joinable ())
|
||||
{
|
||||
thread.join ();
|
||||
}
|
||||
roots.clear ();
|
||||
}
|
||||
|
||||
bool rai::active_transactions::start (std::shared_ptr<rai::block> block_a, std::function<void(std::shared_ptr<rai::block>)> const & confirmation_action_a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue