Correct a simple NULL-check in optimizer.c's uop_item() (GH-140069)

This commit is contained in:
Maurycy Pawłowski-Wieroński 2025-10-14 17:18:20 +02:00 committed by GitHub
parent 279db6bede
commit 3490a99046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -362,7 +362,7 @@ uop_item(PyObject *op, Py_ssize_t index)
return NULL;
}
PyObject *target = PyLong_FromUnsignedLong(self->trace[index].target);
if (oparg == NULL) {
if (target == NULL) {
Py_DECREF(oparg);
Py_DECREF(oname);
return NULL;