A vacuum leak on a mass airflow engine is bad. The mass airflow sensor needs to see the airflow so as to calculate how much fuel to deliver. If the air is getting around the MAF sensor the computer will be lied to. In the old days of TBI the MAP sensor would see the vacuum leak and the computer would richen the mixture to compensate. If the vacuum leak became too great the IAC would close off entirely and the vacuum leak would cause an abnormally high idle.
Might take the time to get the whole intake system cleaned at the same time. My wife's 6.0L Chevy was having an erratic idle. I took out the idle air control motor and cleaned the tip off to get the proper idle back. The tip of her IAC motor was covered with a nasty black goo.