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
1 file changed