fix mem leak in sparse solver test
fixing indexes