Generally, a free confession to police isn't automatically illegal, but its acceptance in a trial is a tricky matter. The key factor is whether it was obtained legally. Officers must adhere to specific guidelines, https://panchanandshaw.com/blog/contempt-notice-explained/