Fix memory leak in C code for blocksparse.