Kaydet (Commit) 9c0408d9 authored tarafından Xiang Zhang's avatar Xiang Zhang Kaydeden (comit) GitHub

bpo-29876: fix DECREF for NULL value in subelement() (GH-760)

üst e6a55dd8
......@@ -524,8 +524,9 @@ subelement(PyObject* self, PyObject* args, PyObject* kw)
}
elem = element_new(tag, attrib);
Py_DECREF(attrib);
if (elem == NULL)
return NULL;
if (element_add_subelement(parent, elem) < 0) {
Py_DECREF(elem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment