This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
On Wed, Nov 19, 2008 at 9:54 PM, Pedro Alves <pedro@codesourcery.com> wrote: > 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! Oh bother. Good catch. Can you (or someone) review this patch which includes the suggested changes?
Attachment:
gdb-081119-sym-info-2.patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |