From cd8eb85dfc801517301ffb202976df7050375830 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 28 Apr 2020 10:42:42 +0200 Subject: [PATCH] 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. --- src/checks.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/checks.c b/src/checks.c index 7caf6a551..183b42fc6 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; }