The Messenger of Allah ﷺ said, "A woman was punished because of a cat she confined until it died of hunger. She neither fed it nor released it so it could eat from the insects of the earth. And a man was forgiven for removing a thorny branch from the road."
حدثنا حماد بن أسامة حدثنا هشام عن أبيه
قال رسول الله ﷺ إن امرأة عذبت في هرة أمسكتها حتى ماتت من الجوع لم تكن تطعمها ولم ترسلها فتأكل من حشرات الأرض وغفر لرجل نحى غصن شوك عن الطريق
Its isnad is sahih. The first part of it, about the woman being punished over a cat, was narrated by Bukhari 6:255 through Abdul-Ala, from Ubaydullah, from Saeed Maqburi, but he did not give its wording, referring instead to the hadith of Ibn Umar with the same meaning. Its meaning has already appeared through two other routes, 7538 and 7635.The other part of it, about removing the branch, its meaning has already appeared through the narration of Abu Salih, 7828.Hisham is Ibn Urwa bin Zubayr.