* [libstdc++ trunk & 3.0] Fix deque memory leak
@ 2001-11-13 15:03 Phil Edwards
0 siblings, 0 replies; only message in thread
From: Phil Edwards @ 2001-11-13 15:03 UTC (permalink / raw)
To: gcc-patches
As discussed on the libstdc++ mailing list. Tested on i686/linux.
2001-11-16 Paolo Carlini <pcarlini@unitus.it>
* include/bits/stl_deque.h (deque::erase()): Fix memory leak.
Index: include/bits/stl_deque.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_deque.h,v
retrieving revision 1.13
diff -u -3 -p -r1.13 stl_deque.h
--- stl_deque.h 2001/11/02 17:38:11 1.13
+++ stl_deque.h 2001/11/16 20:58:14
@@ -900,7 +900,7 @@ deque<_Tp,_Alloc>::erase(iterator __firs
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 {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-11-16 21:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 [libstdc++ trunk & 3.0] Fix deque memory leak Phil Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).