From: Jeff Trawick Date: Wed, 23 Oct 2013 01:32:32 +0000 (+0000) Subject: don't pass uninitialized rv passed to ap_log_rerror() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d616d4cb4a48924cfb515c1bc80cdbfe5e14175;p=thirdparty%2Fapache%2Fhttpd.git don't pass uninitialized rv passed to ap_log_rerror() (rv wasn't interesting / follow an existing example) stop throwing away a pointer on the heap (clang scan-build) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534892 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c index 220f9c8bd08..a138e6b8bf1 100644 --- a/modules/cache/mod_cache_socache.c +++ b/modules/cache/mod_cache_socache.c @@ -919,7 +919,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, if (sobj->headers_in) { if (APR_SUCCESS != store_table(sobj->headers_in, sobj->buffer, sobj->buffer_len, &slider)) { - ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(02376) + ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02376) "in-headers didn't fit in buffer %s", sobj->key); apr_pool_destroy(sobj->pool); @@ -1239,10 +1239,11 @@ static void *create_config(apr_pool_t *p, server_rec *s) static void *merge_config(apr_pool_t *p, void *basev, void *overridesv) { - cache_socache_conf *ps = apr_pcalloc(p, sizeof(cache_socache_conf)); + cache_socache_conf *ps; cache_socache_conf *base = (cache_socache_conf *) basev; cache_socache_conf *overrides = (cache_socache_conf *) overridesv; + /* socache server config only has one field */ ps = overrides ? overrides : base; return ps;