]> granicus.if.org Git - python/commitdiff
a & b were dereffed above, so they are known to be valid pointers.
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:00:32 +0000 (02:00 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:00:32 +0000 (02:00 +0000)
z is known to be NULL, nothing to DECREF.

Reported by Klockwork, #107.

Objects/longobject.c

index c9b93b6ac63f51adcc524217139d03f6b32fccb2..cbd6f2be593ed713df5b91aede6e4a9263dc1cad 100644 (file)
@@ -3149,9 +3149,8 @@ long_bitwise(PyLongObject *a,
                : MAX(size_a, size_b);
        z = _PyLong_New(size_z);
        if (z == NULL) {
-               Py_XDECREF(a);
-               Py_XDECREF(b);
-               Py_XDECREF(z);
+               Py_DECREF(a);
+               Py_DECREF(b);
                return NULL;
        }