]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Correct a simple NULL-check in `optimizer.c`'s `uop_item()` (GH-140069)
authorMaurycy Pawłowski-Wieroński <5383+maurycy@users.noreply.github.com>
Tue, 14 Oct 2025 15:18:20 +0000 (17:18 +0200)
committerGitHub <noreply@github.com>
Tue, 14 Oct 2025 15:18:20 +0000 (16:18 +0100)
Python/optimizer.c

index 83b0b1a5deba5cfca6d555a7dc311a09a97cb952..6ad9124744859a3dd75a88f61d8d23c00fc2b2e0 100644 (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;