libiberty: Always return NULL if d_add_substitution fails.
authorMark Wielaard <mark@klomp.org>
Fri, 21 Apr 2017 09:01:56 +0000 (09:01 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Fri, 21 Apr 2017 09:01:56 +0000 (09:01 +0000)
commit13b6ef76dc275232310ebfca27db08aeef9b858c
treea7877742e13eda04830c6b97ef5b5822412562dd
parent1240212c6b2ad61a9f8f918192fbb67d45405cc2
libiberty: Always return NULL if d_add_substitution fails.

d_add_substitution can fail for various reasons, like when the subs array
is full. If d_add_substitution fails d_substitution should return NULL
early and not try to continue. Every other call of d_add_substitution
is handled in the same way.

libiberty/ChangeLog:

* cp-demangle.c (d_substitution): Return NULL if d_add_substitution
fails.

From-SVN: r247055
libiberty/ChangeLog
libiberty/cp-demangle.c