Fix a memory leak with raw inputs.