Fixed a small memory leak [ci skip].