summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2023-03-14 16:43:27 +0100
committerYann Ylavic <ylavic@apache.org>2023-03-14 16:43:27 +0100
commitd51326e797fcf61fedecfa5126bf56723a36967a (patch)
tree37647b08d07a827087fe5082b17c42ae12224f43 /server
parentutil_time: Follow up to r1908380: Avoid apr_snprintf() like others. (diff)
downloadapache2-d51326e797fcf61fedecfa5126bf56723a36967a.tar.xz
apache2-d51326e797fcf61fedecfa5126bf56723a36967a.zip
log: Follow up to r1908388: ap_server_conf might be NULL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908390 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/log.c b/server/log.c
index 6beb03a701..2f84635a75 100644
--- a/server/log.c
+++ b/server/log.c
@@ -1100,7 +1100,9 @@ static void log_error_core(const char *file, int line, int module_index,
}
/* Use the main ErrorLogFormat if any */
- sconf = ap_get_core_module_config(ap_server_conf->module_config);
+ if (ap_server_conf) {
+ sconf = ap_get_core_module_config(ap_server_conf->module_config);
+ }
}
else {
int configured_level = r ? ap_get_request_module_loglevel(r, module_index) :
@@ -1148,7 +1150,7 @@ static void log_error_core(const char *file, int line, int module_index,
}
}
}
- else {
+ else if (ap_server_conf) {
/* Use the main ErrorLogFormat if any */
sconf = ap_get_core_module_config(ap_server_conf->module_config);
}
@@ -1222,7 +1224,7 @@ static void log_error_core(const char *file, int line, int module_index,
info.file = file;
info.line = line;
info.status = status;
- log_format = sconf->error_log_format;
+ log_format = sconf ? sconf->error_log_format : NULL;
done = 1;
}