From 9bb1399bac063e4daac119fc636147cbab066c9d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 3 Aug 2018 14:52:45 +0100 Subject: Fix libdom departures from "always return a ref" in public API. The DOM test code expects nodes returned by libdom APIs to always be reffed. So this change refs them. The remaining leaks detected by address sanitiser in the dom test suite are a problem with the DOM test generator: * 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`. --- src/html/html_fieldset_element.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/html/html_fieldset_element.c') diff --git a/src/html/html_fieldset_element.c b/src/html/html_fieldset_element.c index c869822..fe44e74 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; } -- cgit v1.2.3