BUG/MEDIUM: pools: Always update free_list in pool_gc().
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 12 Mar 2020 18:05:39 +0000 (19:05 +0100)
committerOlivier Houchard <cognet@ci0.org>
Thu, 12 Mar 2020 18:07:10 +0000 (19:07 +0100)
commit51d9339d04fb53c63a3f55c9cea2f4a63e6facbe
treeb2b4d716f33959b4b96d31ee67b53bc3f4075fff
parentbdb00c5db9efc699b93db8de40ed77c80dcb0615
BUG/MEDIUM: pools: Always update free_list in pool_gc().

In pool_gc(), when we're not using lockless pool, always update free_list,
and read from it the next element to free. As we now unlock the pool while
we're freeing the item, another thread could have updated free_list in our
back. Not doing so could lead to segfaults when pool_gc() is called.

This should be backported to 2.1.
src/memory.c