The Messenger of Allah ﷺ said, "Whoever buys food should not sell it until he has taken full possession of it."
أخبرنا محمد بن سلمة والحارث بن مسكين قراءة عليه وأنا أسمع عن ابن القاسم عن مالك عن نافع
قال رسول الله ﷺ من ابتاع طعاما فلا يبعه حتى يستوفيه
Bukhari narrated it in the Book of Business Transactions, chapter "Measuring Is the Responsibility of the Seller and the One Delivering," hadith no. 2126, and Muslim in the Book of Business Transactions, chapter "The Invalidity of Selling What Has Been Sold Before Taking Possession of It," hadith no. 1526, both from the hadith of Malik through this chain. It is also found in Muwatta (Yahya's recension), 2/640, and in Kubra, hadith no. 6187.