CLEANUP: checks: do not allocate a connection for process checks

Since this connection is not used at all anymore, do not allocate it.
It was verified that check successes and failures (both synchronous
and asynchronous) continue to be properly reported.
This commit is contained in:
Willy Tarreau 2017-10-04 15:25:38 +02:00
parent d7c3fbd5c3
commit b398e643d4

View File

@ -2964,8 +2964,8 @@ const char *init_check(struct check *check, int type)
} }
check->bo->size = global.tune.chksize; check->bo->size = global.tune.chksize;
/* Allocate buffer for partial results... */ if (check->type != PR_O2_EXT_CHK &&
if ((check->conn = calloc(1, sizeof(struct connection))) == NULL) { (check->conn = calloc(1, sizeof(struct connection))) == NULL) {
return "out of memory while allocating check connection"; return "out of memory while allocating check connection";
} }