input: fix a potential leak when reducing controls