path: root/src/html/html_document.c
diff options
authorMichael Drake <>2018-08-03 14:52:45 +0100
committerMichael Drake <>2019-02-16 11:29:04 +0000
commit9bb1399bac063e4daac119fc636147cbab066c9d (patch)
tree519368d73c303b60544d109121dc3dede88f1cc4 /src/html/html_document.c
parente437bb9126df49de815a06ff86edf4d6c4d252ac (diff)
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_document.c')
1 files changed, 0 insertions, 1 deletions
diff --git a/src/html/html_document.c b/src/html/html_document.c
index 9f53295..50a15a7 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;