* input.c: fix invalid free.