From: Giovanni Bechis Date: Fri, 24 Mar 2023 08:50:19 +0000 (+0000) Subject: add error message when storing data to temp file fails. X-Git-Tag: 2.5.0-alpha2-ci-test-only~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56745ba205f51eca713f4a3b3dcd1fd16103bb3f;p=thirdparty%2Fapache%2Fhttpd.git add error message when storing data to temp file fails. Github: closes #182 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908684 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index efba5f21902..61f7ab80ca2 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -10413 +10414 diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c index 8d17a195f3c..ecc037867a4 100644 --- a/modules/cache/mod_cache_disk.c +++ b/modules/cache/mod_cache_disk.c @@ -1033,7 +1033,14 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r) varray = apr_array_make(r->pool, 6, sizeof(char*)); tokens_to_array(r->pool, tmp, varray); - store_array(dobj->vary.tempfd, varray); + rv = store_array(dobj->vary.tempfd, varray); + if (rv != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(10413) + "could not write to vary file %s", + dobj->vary.tempfile); + apr_pool_destroy(dobj->vary.pool); + return rv; + } rv = apr_file_close(dobj->vary.tempfd); if (rv != APR_SUCCESS) {