]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: checks: Remove bad call to free() when an expect rule is parsed
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 08:42:42 +0000 (10:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 08:42:45 +0000 (10:42 +0200)
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

index 7caf6a551659349d36046997ecbdd3a184a94545..183b42fc686540585e3252f3af1594f7d7f33e38 100644 (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;
        }