RFC: fix ref counting in gdbpy_selected_inferior

Tom Tromey tromey@redhat.com
Tue Jun 18 18:47:00 GMT 2013


>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:

Tom> gdbpy_selected_inferior is double-counting its returned object.
Tom> This is obvious when you realize that inferior_to_inferior_object
Tom> returns a new reference.
Tom> This patch fixes the problem by removing an incref.

Tom> Built and regtested on x86-64 Fedora 18.

Tom> 	* python/py-inferior.c (gdbpy_selected_inferior): Don't incref.

I'm checking this in now.

Tom



More information about the Gdb-patches mailing list