cplus-demangler, free resource after a failed call to gnu_special.
authorAndrew Burgess <aburgess@broadcom.com>
Wed, 28 May 2014 22:06:43 +0000 (23:06 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 28 May 2014 22:06:43 +0000 (23:06 +0100)
commit0aaa9a3aa1e68d309a4746633494b9a01a0575f5
tree13bce4faedd4b19eb8fa802357df6e8c289c2061
parent7f3c034326ce5d487e897826a12c3a4b9d457b49
cplus-demangler, free resource after a failed call to gnu_special.

libiberty/
2014-05-14  Andrew Burgess  <aburgess@broadcom.com>

* cplus-dmem.c (internal_cplus_demangle): Free any resources
allocated by possible previous call to gnu_special.
(squangle_mop_up): Reset pointers to NULL after calling free.
* testsuite/demangle-expected: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210425 138bc75d-0d04-0410-961f-82ee72b054a4
libiberty/ChangeLog
libiberty/cplus-dem.c
libiberty/testsuite/demangle-expected