The Messenger of Allah said: "Whoever performs Hajj for Allah, and he does not have sexual relations nor commit any sin, then his previous sins will be forgiven."
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ حَجَّ فَلَمْ يَرْفُثْ وَلَمْ يَفْسُقْ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ