aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_list.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c
index 89ea82352..d0eb15930 100644
--- a/src/core/ngx_list.c
+++ b/src/core/ngx_list.c
@@ -19,18 +19,10 @@ ngx_list_create(ngx_pool_t *pool, ngx_uint_t n, size_t size)
return NULL;
}
- list->part.elts = ngx_palloc(pool, n * size);
- if (list->part.elts == NULL) {
+ if (ngx_list_init(list, pool, n, size) != NGX_OK) {
return NULL;
}
- list->part.nelts = 0;
- list->part.next = NULL;
- list->last = &list->part;
- list->size = size;
- list->nalloc = n;
- list->pool = pool;
-
return list;
}