summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2016-03-26 13:57:03 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2016-03-26 13:57:03 +0000
commit60ddf99c1a8cd04493236d85069a78b3626fb6fd (patch)
tree9b3b0c339d5dc42148967c17ce39fa871fa23021
parent033b95a65075eccf50fee21ce51d60b1790bdc8b (diff)
downloadlighttpd-60ddf99c1a8cd04493236d85069a78b3626fb6fd.tar.gz
[configparser] fix small leak on config failure
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3132 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/configparser.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/configparser.y b/src/configparser.y
index 12be92ad..99e20a78 100644
--- a/src/configparser.y
+++ b/src/configparser.y
@@ -533,7 +533,11 @@ context ::= DOLLAR SRVVARNAME(B) LBRACKET stringop(C) RBRACKET cond(E) expressio
break;
}
- if (ctx->ok) configparser_push(ctx, dc, 1);
+ if (ctx->ok) {
+ configparser_push(ctx, dc, 1);
+ } else {
+ dc->free((data_unset*) dc);
+ }
}
buffer_free(b);