You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2013/10/15 22:02:31 UTC

svn commit: r1532507 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

Author: jim
Date: Tue Oct 15 20:02:30 2013
New Revision: 1532507

URL: http://svn.apache.org/r1532507
Log:
don't use what could have been freed...

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1532507&r1=1532506&r2=1532507&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Tue Oct 15 20:02:30 2013
@@ -1218,11 +1218,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sha
     } else {
         action = "re-using";
     }
+    balancer->s = shm;
+    balancer->s->index = i;
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02337)
                  "%s shm[%d] (0x%pp) for %s", action, i, (void *)shm,
                  balancer->s->name);
-    balancer->s = shm;
-    balancer->s->index = i;
     /* the below should always succeed */
     lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0");
     if (lbmethod) {
@@ -1731,12 +1731,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sha
     } else {
         action = "re-using";
     }
+    worker->s = shm;
+    worker->s->index = i;
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338)
                  "%s shm[%d] (0x%pp) for worker: %s", action, i, (void *)shm,
                  ap_proxy_worker_name(NULL, worker));
-
-    worker->s = shm;
-    worker->s->index = i;
     return APR_SUCCESS;
 }