In this case both. Teaching is good. But that doesn't preclude punishment. It's interesting that Korihor brought on his own punishments (he asked for a sign and he acknowledged "I brought this great curse upon me"). Later he chose to go be with the wicked Zoramites where he was killed.
I think another question to ask is, "Did Korihor knowingly do anything wrong or was it innocent ignorance?"
Alma 30:53 says
At the beginning he knew it wasn't true, but he taught it anyway. (The word "insomuch" can mean "to such an extent that".) He was told to teach a lie, and he resisted the truth and taught it and continued until his success caused him to start to believe.
What were his motivations? Perhaps he enjoyed persuading people, or perhaps he enjoyed the notoriety he gained. Or perhaps it was something even more sinister. Korihor admitted in vs 52 "I always knew that there was a God".
Even after being taught and acknowledging his wrongs Alma says to him
So it wasn't a simple misunderstanding. And, he wasn't changed. If Korihor had the chance, he'd revert to teaching falsehoods again.