Section 142(1) in Bharatiya Nagarik Suraksha Sanhita, 2023
(1)Whenever the District Magistrate in the case of an order passed by an Executive Magistrate under section 136, or the Chief Judicial Magistrate in any other case is of opinion that any person imprisoned for failing to give security under this Chapter may be released without hazard to the community or to any other person, he may order such person to be discharged.