Fix memory leaks in bison_index