Maliks Muwatta Book 056, Hadith Number 023.

Section : Punishing the Many for the Actions of the Few.

Malik related to me that Ismail ibn Abi Hakim heard Umar ibn Abd al-Aziz say, "Some say that Allah the Blessed, the Exalted, will not punish the many for the wrong action of the few. However, when the objectionable action is committed openly, then they all deserve to be punished."