aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_list.c')
-rw-r--r--src/core/ngx_list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c
index 236eff4f9..c082afa37 100644
--- a/src/core/ngx_list.c
+++ b/src/core/ngx_list.c
@@ -19,11 +19,13 @@ void *ngx_list_push(ngx_list_t *l)
/* the last part is full, allocate a new list part */
- if (!(last = ngx_palloc(l->pool, sizeof(ngx_list_part_t)))) {
+ last = ngx_palloc(l->pool, sizeof(ngx_list_part_t));
+ if (last == NULL) {
return NULL;
}
- if (!(last->elts = ngx_palloc(l->pool, l->nalloc * l->size))) {
+ last->elts = ngx_palloc(l->pool, l->nalloc * l->size);
+ if (last->elts == NULL) {
return NULL;
}