mirror of
https://github.com/apache/httpd.git
synced 2025-08-06 11:06:17 +00:00
make sure we set rc before referencing it
use a somewhat better warning message for a failure of ap_server_relative_root() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
7
modules/cache/mod_file_cache.c
vendored
7
modules/cache/mod_file_cache.c
vendored
@ -196,7 +196,12 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
|
||||
const char *fspec;
|
||||
|
||||
fspec = ap_server_root_relative(cmd->pool, filename);
|
||||
if (!fspec || (rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
|
||||
if (!fspec) {
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
|
||||
"mod_file_cache: unable to find relative path for "
|
||||
"%s, skipping", filename);
|
||||
}
|
||||
if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
|
||||
cmd->temp_pool)) != APR_SUCCESS) {
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
|
||||
"mod_file_cache: unable to stat(%s), skipping", filename);
|
||||
|
Reference in New Issue
Block a user