mirror of
https://github.com/nginx/nginx.git
synced 2026-09-02 03:22:54 +00: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue