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: Tom Tromey <tromey at redhat dot com>
- To: pmuldoon at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 26 Jul 2011 08:16:58 -0600
- Subject: Re: [patch][python] Fix sigsegv when a printer fails to return a value and string_print is set.
- References: <m3tya9z41t.fsf@redhat.com>
>>>>> "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.
Tom