Remove undefined increment of an erased iterator. (#274)

master
Eric Schreiber 6 years ago committed by Andre Puschmann
parent b801c3dd4e
commit 46d41a5dc5

@ -93,10 +93,10 @@ void pdcp::reset()
{
// destroy all bearers
pthread_rwlock_wrlock(&rwlock);
for (pdcp_map_t::iterator it = pdcp_array.begin(); it != pdcp_array.end(); ++it) {
for (pdcp_map_t::iterator it = pdcp_array.begin(); it != pdcp_array.end(); /* post increment in erase */ ) {
it->second->reset();
delete(it->second);
pdcp_array.erase(it);
pdcp_array.erase(it++);
}
pthread_rwlock_unlock(&rwlock);

Loading…
Cancel
Save