You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jk...@apache.org on 2014/08/26 13:05:38 UTC

svn commit: r1620569 - /httpd/httpd/trunk/server/mpm/worker/worker.c

Author: jkaluza
Date: Tue Aug 26 11:05:37 2014
New Revision: 1620569

URL: http://svn.apache.org/r1620569
Log:
worker MPM: Fix null-dereference crash when using -DFOREGROUND with worker MPM

Modified:
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1620569&r1=1620568&r2=1620569&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Tue Aug 26 11:05:37 2014
@@ -2097,10 +2097,10 @@ static int worker_pre_config(apr_pool_t 
                              "apr_proc_detach failed");
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
-            retained->idle_spawn_rate = apr_palloc(pconf, sizeof(int) * num_buckets);
-            for (i = 0; i< num_buckets; i++) {
-                retained->idle_spawn_rate[i] = 1;
-            }
+        }
+        retained->idle_spawn_rate = apr_palloc(pconf, sizeof(int) * num_buckets);
+        for (i = 0; i< num_buckets; i++) {
+            retained->idle_spawn_rate[i] = 1;
         }
     }