Delete temporary string within demangler even in failure cases.
authorAndrew Burgess <aburgess@broadcom.com>
Tue, 27 May 2014 10:57:33 +0000 (11:57 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 11 Jun 2014 10:41:51 +0000 (11:41 +0100)
commit173373c6f6388171d1d62a217fae90a052395be2
tree5af385b647b127628d2fbd0f4e8426bb82fe79fd
parent364fe1f72265eb54bce08511233d06ed48e9c41a
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
libiberty/cplus-dem.c
This page took 0.025414 seconds and 4 git commands to generate.