This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] Fix sigsegv when a printer fails to return a value and string_print is set.
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Jul 2011 11:38:16 +0100
- Subject: Re: [patch][python] Fix sigsegv when a printer fails to return a value and string_print is set.
- References: <m3tya9z41t.fsf@redhat.com> <m3livlqg85.fsf@fleche.redhat.com>
- Reply-to: pmuldoon at redhat dot com
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
>
> I think the patch is fine, but one nit...
>
> Phil> + /* If we previously used THEVALUE, free it as we have already
> Phil> + printed the contents to the ui_file STB. */
> Phil> + if (thevalue)
> Phil> + xfree (thevalue);
>
> Since the function is using cleanups, just make a cleanup where this is
> allocated.
I removed the hunk entirely, as we discussed on irc.
So committed.
Thanks
Phil