summaryrefslogtreecommitdiff
path: root/render/box_construct.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-03-14 15:54:10 +0000
committerVincent Sanders <vince@kyllikki.org>2016-03-14 15:54:10 +0000
commitc53be108924ed460aad35bb30c5c88a849bded20 (patch)
treed29d6a9663e08958912ad20cd6160e0941fa7924 /render/box_construct.c
parentfdbb413403c5559edda3e635b84c0515363a400f (diff)
downloadnetsurf-c53be108924ed460aad35bb30c5c88a849bded20.tar.gz
netsurf-c53be108924ed460aad35bb30c5c88a849bded20.tar.bz2
Fix memory leak in error handling
error handling during form gadget construction could leak, this fixes the leak on error. Fixes coverity CID 1109875
Diffstat (limited to 'render/box_construct.c')
-rw-r--r--render/box_construct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index adb450946..8434253a3 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2654,6 +2654,7 @@ bool box_select(BOX_SPECIAL_PARAMS)
if (err != DOM_NO_ERR) {
dom_node_unref(c2);
dom_node_unref(c);
+ form_free_control(gadget);
return false;
}