It is narrated from Sayyiduna Sahl bin Sa’d (may Allah be pleased with him) that a man from the tribe of Banu Aslam came to the Noble Prophet (peace and blessings be upon him) and confessed that he had committed adultery with a woman, and he also mentioned the name of that woman. The Prophet (peace and blessings be upon him) sent for that woman and asked her about this wrongdoing; she denied it. So the Prophet (peace and blessings be upon him) imposed the prescribed punishment (hadd) on that man and let the woman go.
Hadith Referenceالفتح الربانی / مسائل الحدود / 6714
Benefits: … The one who confesses to adultery (zina) will, in every case, have the prescribed punishment (hadd) applied to him. However, the one whom he is accusing—if that person neither confesses, nor are there four witnesses against him, nor is there any sign of pregnancy—then no punishment will be given to him.