Fix issue #39, add missing Py_INCREF
This commit is contained in:
parent
7545cdf9f3
commit
7f7a512e66
1
pygit2.c
1
pygit2.c
@ -425,6 +425,7 @@ Repository_get_index(Repository *self, void *closure)
|
|||||||
py_index = (Index*)IndexType.tp_alloc(&IndexType, 0);
|
py_index = (Index*)IndexType.tp_alloc(&IndexType, 0);
|
||||||
if (!py_index)
|
if (!py_index)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
|
Py_INCREF(self);
|
||||||
py_index->repo = self;
|
py_index->repo = self;
|
||||||
py_index->index = index;
|
py_index->index = index;
|
||||||
py_index->own_obj = 0;
|
py_index->own_obj = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user