Merge "Fix a few memory leaks in the input dispatcher.  (DO NOT MERGE)" into ics-mr1