Fix a memory leakage issue.