httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1532507 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Tue, 15 Oct 2013 20:02:31 GMT
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;
 }
 



Mime
View raw message