Generally, a free confession to police isn't inherently invalid, but its use in the legal system is a complicated matter. The key factor is whether it was obtained fairly. Officers must adhere to specific rules, https://panchanandshaw.com/blog/costs-in-pil-explained/