Fix huge memory leak in pool()