codership/galera — pull request #83 by AndreasVerhoeven (2014-07-23 22:03:39+00:00)
Title: Usage of invalidated iterator

After calling push_front() on a std::deque<>, iterators become invalid per the C++ standard ("after push_back() and push_front() all references stays valid, but iterators don't").

Using prev_begin after the push_front() call results in undefined behavior. This fix removes the usage of an invalid iterator and makes the intent of the code more clear.