diff Modules/_elementtree.c @ 84734:76bb3fe6ce8f 3.3

Add missing check of PyDict_Update()'s return value in _elementtree.c CID 719637
author Christian Heimes <christian@cheimes.de>
date Sat, 20 Jul 2013 15:12:09 +0200
parents cd4c9d4bd88f
children 39823ebfc731 e7305517260b
line wrap: on
line diff
--- a/Modules/_elementtree.c	Sat Jul 20 15:01:26 2013 +0200
+++ b/Modules/_elementtree.c	Sat Jul 20 15:12:09 2013 +0200
@@ -347,7 +347,8 @@
     Py_DECREF(attrib_str);
 
     if (attrib)
-        PyDict_Update(attrib, kwds);
+        if (PyDict_Update(attrib, kwds) < 0)
+            return NULL;
     return attrib;
 }