Fix a memory leak, because this test doesn't free the object when it works well.