]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix a double-free bug.
authorBruno Haible <bruno@clisp.org>
Fri, 22 May 2026 23:33:49 +0000 (01:33 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 22 May 2026 23:33:49 +0000 (01:33 +0200)
Reported by <yangzaocn@outlook.com> at <https://savannah.gnu.org/bugs/?68391>.

* gettext-tools/src/locating-rules.c (locating_rule_list_add_from_file): Remove
xmlFreeDoc invocation inside the loop.

gettext-tools/src/locating-rules.c

index 730fadd1525484e64d9f049ed1fb2e9a311b1dbd..3e2ab7a076edfe1daae969e36234200a4e6bf29c 100644 (file)
@@ -333,7 +333,6 @@ locating_rule_list_add_from_file (struct locating_rule_list_ty *rules,
           if (!xmlHasProp (node, BAD_CAST "pattern"))
             {
               missing_attribute (node, "pattern");
-              xmlFreeDoc (doc);
             }
           else
             {