aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2014-06-11 10:57:27 +0000
committerPedro Alves <palves@gcc.gnu.org>2014-06-11 10:57:27 +0000
commitac8345a525674204550c7a9f5cbb3deec7467d6d (patch)
tree4d52113401587f99e543f605783372eabe76714c /gcc/ada/lib-xref.adb
parentb785e0b8753dee45572f0ab735bb8752a3a888b0 (diff)
downloadgcc-ac8345a525674204550c7a9f5cbb3deec7467d6d.zip
gcc-ac8345a525674204550c7a9f5cbb3deec7467d6d.tar.gz
gcc-ac8345a525674204550c7a9f5cbb3deec7467d6d.tar.bz2
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. From-SVN: r211449
Diffstat (limited to 'gcc/ada/lib-xref.adb')
0 files changed, 0 insertions, 0 deletions