Sahih Muslim Book 10, Hadith Number 3650.

Chapter : It is invalid to sell the commodity before taking possession of it.

Salim b.’Abdullah (Allah be pleased with them) reported his father having said this: I saw people being beaten during the lifetime of Allah’s Messenger (may peace be upon him) in case they bought the food-grain in bulk, and then sold them at that spot before taking it to their places. This hadith is narrated on the authority of ‘Ubaidullah b. Abdullah b. ‘Umar through another chain of transmitters (and the words are): “His father (Ibn ‘Umar) used to buy food-grains in bulk and then carried them to his people.”