Fix for #538946
Reported upstream as https://svn.boost.org/trac/boost/ticket/2647
Patch taken from http://www.nabble.com/-Boost.Test--valgrind-complains-about-invalid-reads-td20500154.html
|
old
|
new
|
|
| 125 | 125 | { |
| 126 | 126 | while( !m_test_units.empty() ) { |
| 127 | 127 | test_unit_store::value_type const& tu = *m_test_units.begin(); |
| 128 | | |
| 129 | 128 | // the delete will erase this element from map |
| 130 | | if( test_id_2_unit_type( tu.second->p_id ) == tut_suite ) |
| 131 | | delete (test_suite const*)tu.second; |
| 132 | | else |
| 133 | | delete (test_case const*)tu.second; |
| | 129 | delete tu.second; |
| 134 | 130 | } |
| 135 | 131 | } |
| 136 | 132 | |