Fix memory leak related to LIS solver.