They traced the hadith back to the Prophet ﷺ, who said, "It is not lawful for a man to give a gift and then take it back, except for a father with regard to what he gives his child. The one who gives a gift and then takes it back is like a dog that eats until it is full, then vomits, then returns to its vomit."
أخبرنا محمد بن المثنى قال حدثنا ابن أبي عدي عن حسين عن عمرو بن شعيب قال حدثني طاوس
يرفعان الحديث إلى النبي ﷺ قال لا يحل لرجل يعطي عطية ثم يرجع فيها إلا الوالد فيما يعطي ولده ومثل الذي يعطي عطية ثم يرجع فيها كمثل الكلب أكل حتى إذا شبع قاء ثم عاد في قيئه
[Its chain is hasan] Abu Dawud narrated it in the Book of Jihad, chapter on ransoming the captive with money, hadith no. 2694, from the hadith of Hammad bin Salama, with this wording. It is also in al-Kubra, hadith no. 6515.Ibn Ishaq explicitly stated that he heard it directly, as recorded by Ibn Jarud, hadith no. 1080, and others. The hadith is also found in Sirah by Ibn Hisham, hadith no. 203, in my edition.