summaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-rw-r--r--src/html/html_button_element.c5
-rw-r--r--src/html/html_input_element.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/html/html_button_element.c b/src/html/html_button_element.c
index 5d2ba49..4a73fcf 100644
--- a/src/html/html_button_element.c
+++ b/src/html/html_button_element.c
@@ -74,6 +74,11 @@ dom_exception _dom_html_button_element_initialise(struct dom_html_document *doc,
*/
void _dom_html_button_element_finalise(struct dom_html_button_element *ele)
{
+ if (ele->form != NULL) {
+ dom_node_unref(ele->form);
+ ele->form = NULL;
+ }
+
_dom_html_element_finalise(&ele->base);
}
diff --git a/src/html/html_input_element.c b/src/html/html_input_element.c
index dc5ff21..ee75a64 100644
--- a/src/html/html_input_element.c
+++ b/src/html/html_input_element.c
@@ -78,6 +78,16 @@ dom_exception _dom_html_input_element_initialise(struct dom_html_document *doc,
*/
void _dom_html_input_element_finalise(struct dom_html_input_element *ele)
{
+ if (ele->default_value != NULL) {
+ dom_string_unref(ele->default_value);
+ ele->default_value = NULL;
+ }
+
+ if (ele->form != NULL) {
+ dom_node_unref(ele->form);
+ ele->form = NULL;
+ }
+
_dom_html_element_finalise(&ele->base);
}