mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
Slab: improved double free detection.
Previously, an attempt to double free the starting page of the free range was not detected.
This commit is contained in:
parent
34b41a70a6
commit
cdd0cd6e2c
@ -597,7 +597,7 @@ ngx_slab_free_locked(ngx_slab_pool_t *pool, void *p)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user