https://github.com/python/cpython/commit/3490a99046078e4f9df7ac7570f62a0181bb3b89
commit: 3490a99046078e4f9df7ac7570f62a0181bb3b89
branch: main
author: Maurycy Pawłowski-Wieroński <[email protected]>
committer: markshannon <[email protected]>
date: 2025-10-14T16:18:20+01:00
summary:

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

files:
M Python/optimizer.c

diff --git a/Python/optimizer.c b/Python/optimizer.c
index 83b0b1a5deba5c..6ad9124744859a 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -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;

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to