1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

tree: Only allow elements in xmlDocSetRootElement

This commit is contained in:
Nick Wellnhofer
2024-02-22 18:13:53 +01:00
parent d5f5060246
commit 4b698dbaec
3 changed files with 3 additions and 3 deletions

View File

@@ -19789,7 +19789,7 @@ test_xmlDocSetRootElement(void) {
root = gen_xmlNodePtr_in(n_root, 1);
ret_val = xmlDocSetRootElement(doc, root);
if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }
if (ret_val == NULL) { xmlFreeNode(root) ; root = NULL ; }
desret_xmlNodePtr(ret_val);
call_tests++;
des_xmlDocPtr(n_doc, doc, 0);