diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4feb2404051..2f518506198 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2001-11-16 Paolo Carlini + + * include/bits/stl_deque.h (deque::erase()): Fix memory leak. + 2001-11-16 Loren J. Rittle * docs/html/17_intro/howto.html (Thread-safety): Rename diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index a1dda2f8b9e..b837ed74bd3 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -900,7 +900,7 @@ deque<_Tp,_Alloc>::erase(iterator __first, iterator __last) copy_backward(_M_start, __first, __last); iterator __new_start = _M_start + __n; _Destroy(_M_start, __new_start); - _M_destroy_nodes(__new_start._M_node, _M_start._M_node); + _M_destroy_nodes(_M_start._M_node, __new_start._M_node); _M_start = __new_start; } else {