It is narrated from Sayyiduna Salamah bin al-Muhabbiq (may Allah be pleased with him) that a man from the Companions of the Prophet (peace and blessings be upon him) was constantly travelling and going on expeditions. His wife sent a slave-girl of hers with him and said: She will wash your head, serve you and guard your belongings; and she had not given that slave-girl to him (as his property). On that journey his stay grew long, so he had intercourse with the slave-girl. When he returned, the slave-girl told her mistress about it, and she felt intense jealousy and became angry. So she came to the Messenger of Allah (peace and blessings be upon him) and told him what he had done. The Prophet of Allah (peace and blessings be upon him) said to her: "If he forced her, she is free, and he owes the like of her; and if he went to her with her consent, she is his, and he owes (a payment) equal to her price." And he (peace and blessings be upon him) did not carry out any hadd punishment in this case.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6310