From: Christophe Jaillet Date: Wed, 2 Sep 2020 20:04:47 +0000 (+0000) Subject: Be consistent when handling OOM situation X-Git-Tag: 2.5.0-alpha2-ci-test-only~1216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73333ebb98ae34028f1003c8663cbc5e7f1b51bc;p=thirdparty%2Fapache%2Fhttpd.git Be consistent when handling OOM situation git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881400 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c index 96c20a894f5..1831e31e98b 100644 --- a/modules/http2/h2_workers.c +++ b/modules/http2/h2_workers.c @@ -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) {