]> granicus.if.org Git - python/commitdiff
Fix a Py_DECREF to a Py_XDECREF.
authorBrett Cannon <bcannon@gmail.com>
Tue, 4 May 2010 00:48:11 +0000 (00:48 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 4 May 2010 00:48:11 +0000 (00:48 +0000)
Found using Clang's static analyzer.

Modules/pyexpat.c

index d428c66e39efce1bec8ff5f03c592af0f8fc6f44..3b4ccfd0696d0ae89ba890396986c6e0620359cc 100644 (file)
@@ -993,7 +993,7 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
         else {
             bytes_read = readinst(buf, BUF_SIZE, readmethod);
             if (bytes_read < 0) {
-                Py_DECREF(readmethod);
+                Py_XDECREF(readmethod);
                 return NULL;
             }
         }