Fix conf seg fault

This commit is contained in:
2021-11-25 23:14:42 +01:00
parent 8c13eecc51
commit fd5e2302d4

View File

@ -566,7 +566,7 @@ int client_request_handler(sock *client, unsigned long client_num, unsigned int
} }
char *rev_proxy_doc = ""; char *rev_proxy_doc = "";
if (conf->type == CONFIG_TYPE_REVERSE_PROXY) { if (conf != NULL && conf->type == CONFIG_TYPE_REVERSE_PROXY) {
const http_status *status = http_get_status(ctx.status); const http_status *status = http_get_status(ctx.status);
char stat_str[4]; char stat_str[4];
sprintf(stat_str, "%03i", ctx.status); sprintf(stat_str, "%03i", ctx.status);