Always decref the new string. Don't set err.
This commit is contained in:
@@ -168,12 +168,8 @@ Repository_build_as_iter(git_oid *oid, PyObject *accum)
|
|||||||
PyObject *oid_str = git_oid_to_py_str(oid);
|
PyObject *oid_str = git_oid_to_py_str(oid);
|
||||||
|
|
||||||
err = PyList_Append(accum, oid_str);
|
err = PyList_Append(accum, oid_str);
|
||||||
if (err < 0) {
|
Py_DECREF(oid_str);
|
||||||
Error_set(err);
|
return err;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
Py_XDECREF(oid_str);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
|
Reference in New Issue
Block a user