Hadith 506990
Chapter 19: I'tikaf in Ramadan - كتاب الاعتكاف
وَحَدَّثَنِي زِيَادٌ، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، . أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يَذْهَبُ لِحَاجَةِ الإِنْسَانِ فِي الْبُيُوتِ . قَالَ مَالِكٌ لاَ يَخْرُجُ الْمُعْتَكِفُ مَعَ جَنَازَةِ أَبَوَيْهِ وَلاَ مَعَ غَيْرِهَا .
Ziyad related to me from Malik from Ibn Shihab that the Messenger of Allah, may Allah bless him and grant him peace, used to go to relieve himself in houses. Malik said, "Someone doing itikaf should not leave for his parents' funeral or for anything else."
Reference Muwatta Malik 506990
USC-MSA web (English) reference : Book 19, Hadith 9