]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Backport rev. 47171 by neal.norwitz]
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 3 Oct 2006 12:58:52 +0000 (12:58 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 3 Oct 2006 12:58:52 +0000 (12:58 +0000)
Another problem reported by Coverity.  Backport candidate.

Misc/NEWS
Objects/cellobject.c

index e094dcbf2b0b0dd69c82a8acb484292de8dc01e0..3b8e66d571a5a302833c61a9fdb6ae65ede0b0f9 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,7 +25,7 @@ Core and builtins
 - Overflow checking code in integer division ran afoul of new gcc
   optimizations.  Changed to be more standard-conforming.
 
-- Fix warnings reported by Klocwork's static analysis tool.
+- Fix warnings reported by the Coverity and Klocwork static analysis tools.
 
 - Patch #1541585: fix buffer overrun when performing repr() on
   a unicode string in a build with wide unicode (UCS-4) support.
index 3b870934dc10c56aeebd2dcb4f2830aff2626fd1..6b31b982edf5a0b1ff0b45f0249e067a8ef0ae76 100644 (file)
@@ -8,6 +8,8 @@ PyCell_New(PyObject *obj)
        PyCellObject *op;
 
        op = (PyCellObject *)PyObject_GC_New(PyCellObject, &PyCell_Type);
+       if (op == NULL)
+               return NULL;
        op->ob_ref = obj;
        Py_XINCREF(obj);