Skip to content

Commit

Permalink
Fix refcounting
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Nov 4, 2024
1 parent 1d55e6e commit 8d70094
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2478,8 +2478,12 @@ _PyCode_ConstantKey(PyObject *op)

PyObject *slice_key = PySlice_New(start_key, stop_key, step_key);
if (slice_key == NULL) {
Py_DECREF(start_key);
Py_DECREF(stop_key);
Py_DECREF(step_key);
return NULL;
}

key = PyTuple_Pack(2, slice_key, op);
Py_DECREF(slice_key);
}
Expand Down

0 comments on commit 8d70094

Please sign in to comment.