]> granicus.if.org Git - apache/commitdiff
worker MPM: Fix null-dereference crash when using -DFOREGROUND with worker MPM
authorJan Kaluža <jkaluza@apache.org>
Tue, 26 Aug 2014 11:05:37 +0000 (11:05 +0000)
committerJan Kaluža <jkaluza@apache.org>
Tue, 26 Aug 2014 11:05:37 +0000 (11:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1620569 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/worker/worker.c

index 486ce60b84bc99b583a0a88217a7fd44efadc36b..35d5e04def0716894fb9afb866edf90683bb9c93 100644 (file)
@@ -2097,10 +2097,10 @@ static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
                              "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;
         }
     }