Just like the other example about Rajiv who ate the... whatever it was, BOTH are correct. If the listener already knows that it was said to Karan, than "him" is okay.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.