mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 16:04:37 +00:00
BUG/MEDIUM: pools: fix ha_free() on area in the process of being freed
Commit e81248c0c
("BUG/MINOR: pool: always align pool_heads to 64 bytes")
added a free of the allocated pool in pool_destroy() using ha_free(), but
it added a subtle bug by which once the pool is released, setting its
address to NULL inside the structure itself cannot work because the area
has just been freed.
This will need to be backported wherever the patch above is backported.
This commit is contained in:
parent
2d0f873cd8
commit
f9eba78fb8
@ -821,7 +821,7 @@ void *pool_destroy(struct pool_head *pool)
|
||||
if (!pool->users) {
|
||||
LIST_DELETE(&pool->list);
|
||||
/* note that if used == 0, the cache is empty */
|
||||
ha_free(&pool->base_addr);
|
||||
free(pool->base_addr);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user