diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-03 14:52:45 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-03 16:44:07 +0100 |
commit | 12bce23045bfa5b82ee055fb7224e3ee6da62688 (patch) | |
tree | 0423ed1aeef23ef07f0b009f224d288b7c6a3c65 | |
parent | 0a10aeb104d3595def8cfca607abf0babda13c00 (diff) | |
download | libdom-tlsa/test-fixes.tar.gz |
WIP: The test suite has address sanitiser issues.tlsa/test-fixes
For some its that the DOM test code expects nodes returned by libdom
APIs to always be reffed. So this change refs them.
For test_level1_html_HTMLSelectElement08, the problem is that in the
while loop, it doesn't unref `voption` at the end of the loop, in the
test code.
For test_level1_html_HTMLTableElement07, the problem is the
while loop doesn't unref `vrow` at the end of the loop in the
test code.
For test_level1_html_HTMLTableElement09, it's the same for
variable, `vbodies`.
-rw-r--r-- | src/html/html_document.c | 1 | ||||
-rw-r--r-- | src/html/html_fieldset_element.c | 2 | ||||
-rw-r--r-- | src/html/html_label_element.c | 2 | ||||
-rw-r--r-- | src/html/html_object_element.c | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/src/html/html_document.c b/src/html/html_document.c index 9f53295d..50a15a76 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -1144,7 +1144,6 @@ dom_exception _dom_html_document_get_body(dom_html_document *doc, } *body = (dom_html_element *)node; - dom_node_unref(node); } return exc; diff --git a/src/html/html_fieldset_element.c b/src/html/html_fieldset_element.c index c8698225..fe44e746 100644 --- a/src/html/html_fieldset_element.c +++ b/src/html/html_fieldset_element.c @@ -170,7 +170,7 @@ dom_exception dom_html_field_set_element_get_form( } if (form_tmp != NULL) { - *form = (dom_html_form_element *) form_tmp; + *form = (dom_html_form_element *) dom_node_ref(form_tmp); return DOM_NO_ERR; } diff --git a/src/html/html_label_element.c b/src/html/html_label_element.c index 3864cc40..777144a3 100644 --- a/src/html/html_label_element.c +++ b/src/html/html_label_element.c @@ -167,7 +167,7 @@ dom_exception dom_html_label_element_get_form( } if (form_tmp != NULL) { - *form = (dom_html_form_element *) form_tmp; + *form = (dom_html_form_element *) dom_node_ref(form_tmp); return DOM_NO_ERR; } diff --git a/src/html/html_object_element.c b/src/html/html_object_element.c index e926aefd..b51e3a0f 100644 --- a/src/html/html_object_element.c +++ b/src/html/html_object_element.c @@ -274,7 +274,7 @@ dom_exception dom_html_object_element_get_form( } if (form_tmp != NULL) { - *form = (dom_html_form_element *) form_tmp; + *form = (dom_html_form_element *) dom_node_ref(form_tmp); return DOM_NO_ERR; } |