This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] fix thinko in sym info
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>, ppluzhnikov at google dot com
- Date: Thu, 20 Nov 2008 05:54:45 +0000
- Subject: Re: [RFA] fix thinko in sym info
- References: <20081119225237.1D8751C799D@localhost>
This should be:
> +ÂÂÂÂÂÂÂif (offset)
> +ÂÂÂÂÂÂÂ Âxasprintf (&loc_string, "%s + %u", msym_name, offset);
> +ÂÂÂÂÂÂÂelse
> +ÂÂÂÂÂÂÂ Âxasprintf (&loc_string, "%s", msym_name);
> +
... = make_cleanup (xfree, loc_string);
> +ÂÂÂÂÂÂÂfree (loc_string);
do_cleanups (...);
> Â Â Â Â}
... instead of raw 'free'.
The easiest exception you can get here, is if the user quits on a
pagination request inside print_filtered.
There, see, a huge leak is plugged fixed. :-)
(would be s/free/xfree/, btw.)
Other than that, it also looks good to me.
I'd say, go ahead!
--
Pedro Alves