isl_input.c: read_factor: fix read after free in error path