This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]