Skip to content

Commit

Permalink
fix Decrease reference of object Py_XDECREF
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadeau4 committed Sep 5, 2017
1 parent b227796 commit 1111ec4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Src/cdtimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,14 @@ reltime_cmp2(PyCdReltimeObject *self, PyObject *other, cdCalenType calendar) {

if (PyCdReltime_Compare(self, (PyObject *) otherReltime, Py_EQ) == Py_True) {
comparison = 0;
Py_XDECREF(otherReltime);
} else if (PyCdReltime_Compare(self, (PyObject *) otherReltime,
Py_LT) == Py_True) {
comparison = -1;
Py_XDECREF(otherReltime);
} else {
comparison = 1;
}
Py_XDECREF(otherReltime);
SET_CALENDAR(saveCalendar);
return Py_BuildValue("i", comparison);

Expand Down

0 comments on commit 1111ec4

Please sign in to comment.