From: Christopher Faulet Date: Tue, 28 Apr 2020 08:42:42 +0000 (+0200) Subject: BUG/MINOR: checks: Remove bad call to free() when an expect rule is parsed X-Git-Tag: v2.2-dev7~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd8eb85dfc801517301ffb202976df7050375830;p=thirdparty%2Fhaproxy.git BUG/MINOR: checks: Remove bad call to free() when an expect rule is parsed When an error is found during the parsing of an expect rule (tcp or http), everything is released at the same place, at the end of the function. Partly fixes issue #600. No backport needed. --- diff --git a/src/checks.c b/src/checks.c index 7caf6a5516..183b42fc68 100644 --- a/src/checks.c +++ b/src/checks.c @@ -4305,7 +4305,6 @@ static struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, str chk->expect.custom = NULL; /* Must be defined by the caller ! */ break; case TCPCHK_EXPECT_UNDEF: - free(chk); memprintf(errmsg, "pattern not found"); goto error; }