summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/rangeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index a6d1611..132d4cc 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -36,6 +36,7 @@ PyRange_New(long start, long len, long step, int reps)
(last < (-1 - PyInt_GetMax() - step))) {
PyErr_SetString(PyExc_OverflowError,
"integer addition");
+ Py_DECREF(obj);
return NULL;
}
}