Don't leave dangling references to oid strings

This commit is contained in:
richo
2013-01-04 23:03:03 +11:00
parent b65244282e
commit 63d319895c

View File

@@ -165,12 +165,14 @@ static int
Repository_build_as_iter(git_oid *oid, PyObject *accum)
{
int err;
PyObject *oid_str = git_oid_to_py_str(oid);
err = PyList_Append(accum, git_oid_to_py_str(oid));
err = PyList_Append(accum, oid_str);
if (err < 0) {
Error_set(err);
return -1;
}
Py_XDECREF(oid_str);
return 0;
}