Fix memory leak for NODE_input.