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> | 2019-02-16 11:29:04 +0000 |
commit | 9bb1399bac063e4daac119fc636147cbab066c9d (patch) | |
tree | 519368d73c303b60544d109121dc3dede88f1cc4 /src/html/html_object_element.c | |
parent | e437bb9126df49de815a06ff86edf4d6c4d252ac (diff) | |
download | libdom-9bb1399bac063e4daac119fc636147cbab066c9d.tar.gz libdom-9bb1399bac063e4daac119fc636147cbab066c9d.tar.bz2 |
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`.
Diffstat (limited to 'src/html/html_object_element.c')
-rw-r--r-- | src/html/html_object_element.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/html_object_element.c b/src/html/html_object_element.c index e926aef..b51e3a0 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; } |