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]

Re: [RFA] Add parsing support for C++ operators


On 11/11/2009 07:11 AM, Tom Tromey wrote:
"Keith" == Keith Seitz<keiths@redhat.com> writes:
Keith>  +	|	OPERATOR ptype
Keith>  +			{ char *name;
Keith>  +			  long length;
Keith>  +			  struct ui_file *buf = mem_fileopen ();
Keith>  +
Keith>  +			  c_print_type ($2, NULL, buf, -1, 0);
Keith>  +			  name = ui_file_xstrdup (buf,&length);
Keith>  +			  ui_file_delete (buf);
Keith>  +			  $$ = operator_stoken (name);

This leaks 'name', you need a free after the call to operator_stoken.

Indeed! Overzealous pre-submission cleanup...


This is ok with the above change. Thanks.

I have committed this patch. Thank you for reviewing it.


Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]