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.
This commit is contained in:
Christopher Faulet 2020-04-28 10:42:42 +02:00
parent 2edcd4cbde
commit cd8eb85dfc

View File

@ -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;
}