صحيح البخاري Sahih Bukhari كتاب العتق The Book of Manumission (of Slaves)
بَابُ الْخَطَإِ وَالنِّسْيَانِ فِي الْعَتَاقَةِ وَالطَّلاَقِ وَنَحْوِهِ، وَلاَ عَتَاقَةَ إِلاَّ لِوَجْهِ اللَّهِ:

(6) Chapter. What is said about manumission and divorce by mistake or forgetfulness. Manumission of slave should be for Allah’s sake only.

2 hadith
Hadith 2528
حَدَّثَنَا الْحُمَيْدِيُّ ، حَدَّثَنَا سُفْيَانُ ، حَدَّثَنَا مِسْعَرٌ ، عَنْ قَتَادَةَ ، عَنْ زُرَارَةَ بْنِ أَوْفَى ، عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ ، قَالَ : قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " إِنَّ اللَّهَ تَجَاوَزَ لِي عَنْ أُمَّتِي مَا وَسْوَسَتْ بِهِ صُدُورُهَا مَا لَمْ تَعْمَلْ أَوْ تَكَلَّمْ " .
Narrated Abu Huraira: The Prophet said, "Allah has accepted my invocation to forgive what whispers in the hearts of my followers, unless they put it to action or utter it." (See Hadith No. 657 Vol. 8)
Hadith Reference Sahih Bukhari / The Book of Manumission (of Slaves) / Hadith: 2528
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 2529
حَدَّثَنَا مُحَمَّدُ بْنُ كَثِيرٍ ، عَنْ سُفْيَانَ ، حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ ، عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ التَّيْمِيِّ ، عَنْ عَلْقَمَةَ بْنِ وَقَّاصٍ اللَّيْثِيِّ ، قَالَ : سَمِعْتُ عُمَرَ بْنَ الْخَطَّابِ رَضِيَ اللَّهُ عَنْهُ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " الْأَعْمَالُ بِالنِّيَّةِ ، وَلِامْرِئٍ مَا نَوَى ، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ ، وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَتَزَوَّجُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ " .
Narrated `Umar bin Al-Khattab: The Prophet said, "The (reward of) deeds depend on intentions, and every person will get the reward according to what he intends. So, whoever migrated for Allah and His Apostle, then his migration will be for Allah and His Apostle, and whoever migrated for worldly benefits or for marrying a woman, then his migration will be for what he migrated for." (See Hadith No. 1, Vol. 1)
Hadith Reference Sahih Bukhari / The Book of Manumission (of Slaves) / Hadith: 2529
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة