Hadith 6:1064
Marwan ibn Mu'awiyah narrated to us, from al-Zibriqan al-Sarraj, who said: Abu Wa'il prayed over a woman who had died. I said to him: "She used to commit sins (or: she was reckless/transgressive)." He said: "The Prophet of Allah, may Allah bless him and grant him peace, used to pray over whoever prayed towards the Qibla."
حدثنا مروان بن معاوية عن الزبرقان السراج قال صلى أبو وائل على امرأة ماتت فقلت له انها ترهق فقال ان نبي الله صلى الله عليه وسلم صلى على من صلى إلى القبلة