Yep.
He had the choice of attacking Danzo with the possibility of either killing him or relieving him of his hostage, while (highly possibly) killing Karin, or
Letting Danzo keep Karin as a hostage (with no guarantee that she'll be his again anyway), risk letting one of his targets of revenge get away (and being much more alert from now on, as well as knowing many of his abilities), or even getting killed.
Sasuke chose the second option, which isn't very surprising really.