Re: [PATCH] Delete temporary string within demangler even in failure cases.

2014-06-11 Thread Pedro Alves
On 06/10/2014 07:08 PM, Andrew Burgess wrote: > I don't have gcc write permissions, would you (or any other interested > maintainer) mind committing this for me please. Done, and merged to binutils-gdb git repo. Thanks, -- Pedro Alves

Re: [PATCH] Delete temporary string within demangler even in failure cases.

2014-06-10 Thread Andrew Burgess
On 27/05/2014 2:47 PM, Ian Lance Taylor wrote: > On Tue, May 27, 2014 at 3:57 AM, Andrew Burgess wrote: >> >> libiberty/ChangeLog >> >> * cplus-dem.c (do_type): Call string_delete even if the call to >> demangle_template fails. > > This is OK. > > Thanks. > > I have to ask: you

Re: [PATCH] Delete temporary string within demangler even in failure cases.

2014-05-27 Thread Ian Lance Taylor
On Tue, May 27, 2014 at 3:57 AM, Andrew Burgess wrote: > > libiberty/ChangeLog > > * cplus-dem.c (do_type): Call string_delete even if the call to > demangle_template fails. This is OK. Thanks. I have to ask: you know this code is not used, right? You're looking at the old dema

[PATCH] Delete temporary string within demangler even in failure cases.

2014-05-27 Thread Andrew Burgess
Spotted that a call to demangle_template might allocate storage within a temporary string even if the call to demangle_template eventually returns failure. This will never cause the demangler to crash, but does leak memory, as a result I've not added any tests for this. Calling string_delete is sa