This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++ PATCH] Fix leak in _Rb_tree::_M_insert (stl_tree.h)


Chris Jefferson wrote:
I apologise if I'm saying something really stupid, but from my looking at the source code to stl_tree.h, it looks like _M_create_node just allocates memory and doesn't actually do any tree based things. Therefore why not just delay declaring the _Link_type until after the __insert_left initalisation? Then there is no need for a try{...}catch{...}

That's a great idea.


I'll re-run the test and post the results.

Earl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]