Muwatta Malik, Book 29, Hadith 90 (USC-MSA)

Yahya related to me from Malik from Nafi that Abdullan ibn Umar said, "The only place a woman whose husband has died and a woman who is absolutely divorced can spend the night is in their houses."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّهُ كَانَ يَقُولُ لاَ تَبِيتُ الْمُتَوَفَّى عَنْهَا زَوْجُهَا وَلاَ الْمَبْتُوتَةُ إِلاَّ فِي بَيْتِهَا ‏.‏

sunnah.com

also referenced under: Book 29, Hadith 1254 (In-Book)