A camel belonging to Bara bin Azib got into a man's walled garden and caused damage there. The Messenger of Allah ﷺ ruled that the owners of gardens are responsible for guarding them by day, and that whatever livestock damage by night is the liability of their owners.
حدثني يحيى عن مالك عن ابن شهاب
أن ناقة للبراء بن عازب دخلت حائط رجل فأفسدت فيه فقضى رسول الله ﷺ أن على أهل الحوائط حفظها بالنهار وأن ما أفسدت المواشي بالليل ضامن على أهلها