From 60ddf99c1a8cd04493236d85069a78b3626fb6fd Mon Sep 17 00:00:00 2001 From: stbuehler Date: Sat, 26 Mar 2016 13:57:03 +0000 Subject: [configparser] fix small leak on config failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Stefan Bühler git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3132 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/configparser.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1