Re: [PATCH] cplus-demangler, free resource after a failed call to gnu_special.

Ian Lance Taylor
2014-05-09T20:53:47Z

On Fri, May 9, 2014 at 7:35 AM, Andrew Burgess <aburgess@broadcom.com> wrote:

> if ((AUTO_DEMANGLING || GNU_DEMANGLING))
> {
> success = gnu_special (work, &mangled, &decl);
> + if (!success)
> + {
> + delete_work_stuff (work);
> + string_delete (&decl);
> + }

As far as I can see, decl may be uninitialized at this point. I don't
think you can call string_delete. You need to ensure that decl is
initialized somehow.

Ian