]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Be consistent when handling OOM situation
authorChristophe Jaillet <jailletc36@apache.org>
Wed, 2 Sep 2020 20:04:47 +0000 (20:04 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Wed, 2 Sep 2020 20:04:47 +0000 (20:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881400 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_workers.c

index 96c20a894f583c1fdf7ea2dc6ce42850ca86ca96..1831e31e98b363137576de396f8a2befac39bf25 100644 (file)
@@ -341,7 +341,7 @@ h2_workers *h2_workers_create(server_rec *s, apr_pool_t *server_pool,
         n = workers->nslots = workers->max_workers;
         workers->slots = apr_pcalloc(workers->pool, n * sizeof(h2_slot));
         if (workers->slots == NULL) {
-            workers->nslots = 0;
+            n = workers->nslots = 0;
             status = APR_ENOMEM;
         }
         for (i = 0; i < n; ++i) {