From: Jeff Trawick Date: Wed, 20 Nov 2013 22:54:37 +0000 (+0000) Subject: Follow-up to r1539988: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d20a6637b39752925c500e22ceb60697741f61;p=thirdparty%2Fapache%2Fhttpd.git Follow-up to r1539988: Make sure an error log provider has initialized before trying to log to it. (A log function may be called in a window between closing stderr and opening logs.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1543979 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/log.c b/server/log.c index a06b9f794dd..fc027196a1c 100644 --- a/server/log.c +++ b/server/log.c @@ -1118,11 +1118,12 @@ static void log_error_core(const char *file, int line, int module_index, } } - if (!logf && !errorlog_provider) { + if (!logf && !(errorlog_provider && errorlog_provider_handle)) { /* There is no file to send the log message to (or it is * redirected to /dev/null and therefore any formating done below - * would be lost anyway) and there is no log provider available, so - * we just return here. */ + * would be lost anyway) and there is no initialized log provider + * available, so we just return here. + */ return; }