Skip to content

Commit 1fc93c7

Browse files
committed
Fix refcounting some more
1 parent 8d70094 commit 1fc93c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/codeobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,12 +2467,15 @@ _PyCode_ConstantKey(PyObject *op)
24672467
PyObject *stop = slice->stop;
24682468
PyObject *stop_key = _PyCode_ConstantKey(stop);
24692469
if (stop_key == NULL) {
2470+
Py_DECREF(start_key);
24702471
return NULL;
24712472
}
24722473

24732474
PyObject *step = slice->step;
24742475
PyObject *step_key = _PyCode_ConstantKey(step);
24752476
if (step_key == NULL) {
2477+
Py_DECREF(start_key);
2478+
Py_DECREF(stop_key);
24762479
return NULL;
24772480
}
24782481

0 commit comments

Comments
 (0)