python/py-objfile.c (objfpy_get_owner): Increment refcount of result.
gdb/ChangeLog: * python/py-objfile.c (objfpy_get_owner): Increment refcount of result.
This commit is contained in:
parent
f505f9504c
commit
d4d1e336f9
2 changed files with 10 additions and 2 deletions
|
@ -93,9 +93,13 @@ objfpy_get_owner (PyObject *self, void *closure)
|
|||
OBJFPY_REQUIRE_VALID (obj);
|
||||
|
||||
owner = objfile->separate_debug_objfile_backlink;
|
||||
|
||||
if (owner != NULL)
|
||||
return objfile_to_objfile_object (owner);
|
||||
{
|
||||
PyObject *result = objfile_to_objfile_object (owner);
|
||||
|
||||
Py_XINCREF (result);
|
||||
return result;
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue