fix memleak on test queue.