From 173373c6f6388171d1d62a217fae90a052395be2 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Tue, 27 May 2014 11:57:33 +0100 Subject: Delete temporary string within demangler even in failure cases. 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 safe, even if nothing is allocated into the string, the string is initialised with string_init, so we know the internal pointers are NULL. libiberty/ChangeLog * cplus-dem.c (do_type): Call string_delete even if the call to demangle_template fails. --- libiberty/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libiberty/ChangeLog') diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 8390e4c..ddd96cc 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2014-06-11 Andrew Burgess + + * cplus-dem.c (do_type): Call string_delete even if the call to + demangle_template fails. + 2014-06-01 Ray Donnelly * pex-win32.c (argv_to_cmdline): Don't quote -- cgit v1.1