diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c index d3044ac9c..016dc3f78 100644 --- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c @@ -160,7 +160,7 @@ ngx_palloc_small(ngx_pool_t *pool, size_t size, ngx_uint_t align) m = ngx_align_ptr(m, NGX_ALIGNMENT); } - if ((size_t) (p->d.end - m) >= size) { + if (p->d.end - size >= m) { p->d.last = m + size; return m;