FIX: [INPUT] free memory before remalloc a new one.