diff --git a/src/cfgparse.c b/src/cfgparse.c index b0d1f5df8..3188d50e8 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2320,8 +2320,10 @@ int check_config_validity() if (curproxy->state == PR_STSTOPPED) { /* ensure we don't keep listeners uselessly bound */ stop_proxy(curproxy); - free((void *)curproxy->table->peers.name); - curproxy->table->peers.p = NULL; + if (curproxy->table) { + free((void *)curproxy->table->peers.name); + curproxy->table->peers.p = NULL; + } continue; } diff --git a/src/haproxy.c b/src/haproxy.c index 33f2e9ddb..f709224c5 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2367,7 +2367,8 @@ void deinit(void) pool_destroy(p->req_cap_pool); pool_destroy(p->rsp_cap_pool); - pool_destroy(p->table->pool); + if (p->table) + pool_destroy(p->table->pool); p0 = p; p = p->next; diff --git a/src/stick_table.c b/src/stick_table.c index d7e1eb8af..1263ca4c4 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -3588,7 +3588,8 @@ static int table_prepare_data_request(struct appctx *appctx, char **args) return 1; } - if (!((struct proxy *)appctx->ctx.table.target)->table->data_ofs[appctx->ctx.table.data_type]) { + if (!((struct proxy *)appctx->ctx.table.target)->table || + !((struct proxy *)appctx->ctx.table.target)->table->data_ofs[appctx->ctx.table.data_type]) { appctx->ctx.cli.severity = LOG_ERR; appctx->ctx.cli.msg = "Data type not stored in this table\n"; appctx->st0 = CLI_ST_PRINT;