mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
BUG/MEDIUM: checks: Don't try to release undefined conn_stream when a check is freed
When a healt-check is released, the attached conn_stream may be undefined. For instance, this happens when 'no-check' option is used on a server line. So we must check it is defined before trying to release it. This patch must be backported in 1.8.
This commit is contained in:
parent
8d01fd6b3c
commit
23d86d157e
10
src/checks.c
10
src/checks.c
@ -3098,10 +3098,12 @@ void free_check(struct check *check)
|
||||
check->bi = NULL;
|
||||
free(check->bo);
|
||||
check->bo = NULL;
|
||||
free(check->cs->conn);
|
||||
check->cs->conn = NULL;
|
||||
cs_free(check->cs);
|
||||
check->cs = NULL;
|
||||
if (check->cs) {
|
||||
free(check->cs->conn);
|
||||
check->cs->conn = NULL;
|
||||
cs_free(check->cs);
|
||||
check->cs = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void email_alert_free(struct email_alert *alert)
|
||||
|
Loading…
Reference in New Issue
Block a user