Skip to content

Commit

Permalink
NULL check for PySlice_New
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Nov 4, 2024
1 parent af304c8 commit 1d55e6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2477,6 +2477,9 @@ _PyCode_ConstantKey(PyObject *op)
}

PyObject *slice_key = PySlice_New(start_key, stop_key, step_key);
if (slice_key == NULL) {
return NULL;
}
key = PyTuple_Pack(2, slice_key, op);
Py_DECREF(slice_key);
}
Expand Down

0 comments on commit 1d55e6e

Please sign in to comment.