]> granicus.if.org Git - apache/commitdiff
Another potential ap_server_root_relative failure
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 15 Mar 2002 16:59:51 +0000 (16:59 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 15 Mar 2002 16:59:51 +0000 (16:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93959 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_file_cache.c

index 9cdbcf3e80f699e14dd0b860dd3e9ecd559cee93..ac93365cae4e6c0ad01dba56d3e4d9921e029d2b 100644 (file)
@@ -196,10 +196,10 @@ 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 ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN, 
-                       cmd->temp_pool)) != APR_SUCCESS) {
+    if (!fspec || (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", fspec);
+           "mod_file_cache: unable to stat(%s), skipping", filename);
        return;
     }
     if (tmp.finfo.filetype != APR_REG) {