Muwatta Malik, Book 29, Hadith 1227 (In-Book)

Yahya related to me from Malik from Yahya ibn Said that Said ibn al-Musayyab was asked who was obliged to pay the rent for a woman whose husband divorced her while she was in a leased house. Said ibn al-Musayyab said, "Her husband is obliged to pay it." Someone asked, "what if her husband does not have it?" He said, "Then she must pay it." Someone asked, "And if she does not have it?" He said, "Then the Amir must pay it."

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

sunnah.com

also referenced under: Book 29, Hadith 66 (USC-MSA)