summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/http/ngx_http.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index a1c4c9892..e8e059c22 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1024,12 +1024,15 @@ ngx_http_create_locations_tree(ngx_conf_t *cf, ngx_queue_t *locations,
lq = (ngx_http_location_queue_t *) q;
len = lq->name->len - prefix;
- node = ngx_pcalloc(cf->pool,
- offsetof(ngx_http_location_tree_node_t, name) + len);
+ node = ngx_palloc_aligned(cf->pool,
+ offsetof(ngx_http_location_tree_node_t, name) + len);
if (node == NULL) {
return NULL;
}
+ node->left = NULL;
+ node->right = NULL;
+ node->tree = NULL;
node->exact = lq->exact;
node->inclusive = lq->inclusive;