]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34218: Fix a leak in _elementtree.c introduced in GH-6769. (GH-8460)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 25 Jul 2018 11:52:45 +0000 (14:52 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Jul 2018 11:52:45 +0000 (14:52 +0300)
Modules/_elementtree.c

index 1500a6de270dcdc7405498864e70bab46eb8d32b..02781d5d892b99812dd424a1adc9cb1cbe5f061c 100644 (file)
@@ -3178,6 +3178,7 @@ expat_start_doctype_handler(XMLParserObject *self,
                 "The doctype() method of XMLParser is ignored.  "
                 "Define doctype() method on the TreeBuilder target.",
                 1);
+        Py_DECREF(res);
     }
 
     Py_DECREF(doctype_name_obj);