You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2013/10/23 03:32:32 UTC

svn commit: r1534892 - /httpd/httpd/trunk/modules/cache/mod_cache_socache.c

Author: trawick
Date: Wed Oct 23 01:32:32 2013
New Revision: 1534892

URL: http://svn.apache.org/r1534892
Log:
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)

Modified:
    httpd/httpd/trunk/modules/cache/mod_cache_socache.c

Modified: httpd/httpd/trunk/modules/cache/mod_cache_socache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache_socache.c?rev=1534892&r1=1534891&r2=1534892&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache_socache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache_socache.c Wed Oct 23 01:32:32 2013
@@ -919,7 +919,7 @@ static apr_status_t store_headers(cache_
     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
 
 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;