If ThreadPoolInit returned EAGAIN, tp->lock was not freed. (cherry picked from commit d45f3c28cf)
d45f3c28cf