summaryrefslogtreecommitdiffstats
path: root/modules/cache
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2018-10-05 16:38:28 +0200
committerJoe Orton <jorton@apache.org>2018-10-05 16:38:28 +0200
commitb01a818821d208b41e8b5eba27186908b802df0a (patch)
tree577138f0e2a709f8eeec7d5f046df1134ccf0eec /modules/cache
parent* server/protocol.c (ap_rvputs): Call va_end before returning in the (diff)
downloadapache2-b01a818821d208b41e8b5eba27186908b802df0a.tar.xz
apache2-b01a818821d208b41e8b5eba27186908b802df0a.zip
* modules/cache/mod_cache_disk.c (write_headers): Handle
mkdir_structure error case. Fixes Coverity warning. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842926 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache')
-rw-r--r--modules/cache/mod_cache_disk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c
index 52d5dba0b1..ddf16f9c03 100644
--- a/modules/cache/mod_cache_disk.c
+++ b/modules/cache/mod_cache_disk.c
@@ -994,10 +994,11 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
}
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)