summaryrefslogtreecommitdiff
path: root/render/box_construct.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/box_construct.c')
-rw-r--r--render/box_construct.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index 889865cb2..0e4940683 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2597,7 +2597,8 @@ bool box_select(BOX_SPECIAL_PARAMS)
if (box_select_add_option(gadget, c) == false) {
dom_node_unref(c);
- goto no_memory;
+ form_free_control(gadget);
+ return false;
}
} else if (dom_string_caseless_lwc_isequal(name,
corestring_lwc_optgroup)) {
@@ -2650,6 +2651,7 @@ bool box_select(BOX_SPECIAL_PARAMS)
err = dom_node_get_next_sibling(c, &next);
if (err != DOM_NO_ERR) {
dom_node_unref(c);
+ form_free_control(gadget);
return false;
}