Freeing result matrix in test.