diff options
-rw-r--r-- | Modules/_elementtree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 28bdf1effe..d488f01b80 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -310,7 +310,8 @@ get_attrib_from_keywords(PyObject *kwds) /* attrib can be NULL if PyDict_New failed */ if (attrib) - PyDict_Update(attrib, kwds); + if (PyDict_Update(attrib, kwds) < 0) + return NULL; return attrib; } |