Slab: improved double free detection. Previously, an attempt to double free the starting page of the free range was not detected.
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index b2adbf4..0fc63b5 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c
@@ -597,7 +597,7 @@ goto wrong_chunk; } - if (slab == NGX_SLAB_PAGE_FREE) { + if (!(slab & NGX_SLAB_PAGE_START)) { ngx_slab_error(pool, NGX_LOG_ALERT, "ngx_slab_free(): page is already free"); goto fail;