BUG/MAJOR: memory: Don't forget to unlock the rwlock if the pool is empty.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 3 Feb 2020 12:03:30 +0000 (13:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Feb 2020 12:48:23 +0000 (13:48 +0100)
commita102c1be693d3149559058cb62130812a0310ad7
tree5759f6037f0bde7eb441f52692d3ba50aff1b16a
parente16ecc580d88e855994b4676d7c4b18d5afba84c
BUG/MAJOR: memory: Don't forget to unlock the rwlock if the pool is empty.

In __pool_get_first(), don't forget to unlock the pool lock if the pool is
empty, otherwise no writer will be able to take the lock, and as it is done
when reloading, it leads to an infinite loop on reload.

This should be backported with commit 04f5fe87d3d3a222b89420f8c1231461f55ebdeb

(cherry picked from commit 1c7c0d6b97513e79c304aaf834f83843f32a674d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/common/memory.h