diff options
author | Joe Orton <jorton@apache.org> | 2018-10-05 16:38:28 +0200 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2018-10-05 16:38:28 +0200 |
commit | b01a818821d208b41e8b5eba27186908b802df0a (patch) | |
tree | 577138f0e2a709f8eeec7d5f046df1134ccf0eec /modules/cache | |
parent | * server/protocol.c (ap_rvputs): Call va_end before returning in the (diff) | |
download | apache2-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.c | 9 |
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) |