Fix for a memory leak in the pooler.

Posted by Wang Diancheng.   Reviewed by Masataka Saito.