He was speaking to some people with him at the door of the mosque, and he said, "I heard the Messenger of Allah ﷺ say, 'Whoever keeps a dog that is of no use to him for guarding crops or livestock, a qirat is deducted from his deeds every day.'"Zirr asked, "Did you yourself hear this from the Messenger of Allah ﷺ?"He replied, "Yes, by the Lord of this mosque."
وهو يحدث ناسا معه عند باب المسجد، فقال: سمعت رسول الله ﷺ يقول: من اقتنى كلبا لا يغني عنه زرعا، ولا ضرعا، نقص من عمله كل يوم قيراط. قال: أنت سمعت هذا من رسول الله ﷺ؟ فقال: أي، ورب هذا المسجد.
Malik narrated it in Isti'dhan (12), from Yazid bin Khusayfa, that Saaib bin Yazid informed him that he heard Sufyan bin Abu Zuhayr, and he related it. Bukhari narrated it in Muzaraa (2323), and Muslim in Musaqat (1576), both from the hadith of Malik, with the same wording.