You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2018/10/05 14:38:28 UTC
svn commit: r1842926 - /httpd/httpd/trunk/modules/cache/mod_cache_disk.c
Author: jorton
Date: Fri Oct 5 14:38:28 2018
New Revision: 1842926
URL: http://svn.apache.org/viewvc?rev=1842926&view=rev
Log:
* modules/cache/mod_cache_disk.c (write_headers): Handle
mkdir_structure error case. Fixes Coverity warning.
Modified:
httpd/httpd/trunk/modules/cache/mod_cache_disk.c
Modified: httpd/httpd/trunk/modules/cache/mod_cache_disk.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache_disk.c?rev=1842926&r1=1842925&r2=1842926&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache_disk.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache_disk.c Fri Oct 5 14:38:28 2018
@@ -994,10 +994,11 @@ static apr_status_t write_headers(cache_
}
rv = mkdir_structure(conf, dobj->hdrs.file, r->pool);
-
- rv = apr_file_mktemp(&dobj->vary.tempfd, dobj->vary.tempfile,
- APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL,
- dobj->vary.pool);
+ if (rv == APR_SUCCESS) {
+ rv = apr_file_mktemp(&dobj->vary.tempfd, dobj->vary.tempfile,
+ APR_CREATE | APR_WRITE | APR_BINARY | APR_EXCL,
+ dobj->vary.pool);
+ }
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00721)