The Messenger of Allah ﷺ said, "While a man was walking along a road, he came across a thorny branch on the path and removed it. Allah was pleased with his act and forgave him."
أن رسول الله ﷺ قال: بينما رجل يمشي بطريق، إذ وجد غصن شوك على الطريق، فأخره، فشكر الله له فغفر له.
Malik narrated it in "The Congregational Prayer" (6) from Sumayy, the freedman of Abu Bakr, from Abu Salih, from Abu Hurairah, who mentioned it.Bukhari also narrated it in "Wrongs" (2472), and Muslim in "Righteousness and Ties of Kinship" (1914:127) following hadith (2617), both of them through the route of Malik, with the same wording.