Maliks Muwatta Book 38, Hadith Number 8.
Malik related to me from Hilal ibn Usama from Ata ibn Yasar that Umar ibn al-Hakam said, “I went to the Messenger of Allah, may Allah bless him and grant him peace, and said, ‘Messenger of Allah, a slave girl of mine was tending my sheep. I came to her and one of the sheep was lost. I asked her about it and she said that a wolf had eaten it, so I became angry and I am one of the children of Adam, so I struck her on the face. As it happens, I have to set a slave free, shall I free her?’ The Messenger of Allah, may Allah bless him and grant him peace, questioned her, ‘Where is Allah?’ She said, ‘In heaven.’ He said, ‘Who am I?’ She said, ‘You are the Messenger of Allah.’ The Messenger of Allah, may Allah bless him and grant him peace, said, ‘Free her.'”