[RFA] Fix leaks of 'per program space' and 'per inferior' ada task data.

Philippe Waroquiers philippe.waroquiers@skynet.be
Mon Feb 18 21:36:00 GMT 2019


On Sun, 2019-02-17 at 16:27 -0700, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
> 
> Philippe> +  if (data != NULL)
> Philippe> +    XDELETE (data);
> 
> gdb normally uses "xfree" and not XDELETE.
> Also the NULL check isn't needed.
> 
> Philippe> +  if (data != NULL)
> Philippe> +    delete data;
> 
> You don't need the NULL check here either.
> 
> This is ok with these changes.  Thank you for the patch.
Thanks for the review, pushed after having done the above fixes.

Philippe



More information about the Gdb-patches mailing list