The Messenger of Allah ﷺ said, "Whoever buys food must not sell it until he has taken full possession of it."
حدثنا عبد الله بن مسلمة عن مالك عن نافع
أن رسول الله ﷺ قال من ابتاع طعاما فلا يبعه حتى يستوفيه
Bukhari reported it in the Book of Business Transactions, Chapter on selling food before taking possession of it, etc., hadith no. 2136, and Muslim in the Book of Business Transactions, Chapter on the invalidity of selling a purchased item before taking possession of it, hadith no. 1526, from Abdullah bin Maslama Qanabi through this same chain, and it is found in Muwatta (Yahya): 2/640.