If any sheriff, deputy sheriff, jailer, or other custodial personnel shall willfully or wantonly allow the escape of any person committed to that person's custody who is (i) a person charged with a crime, (ii) a person sentenced by the court upon conviction of any offense, or (iii) committed to the Division of Juvenile Justice of the Department of Public Safety, that person shall be guilty of a Class 1 misdemeanor. No prosecution shall be brought against any such officer pursuant to this section by reason of a prisoner being allowed to participate pursuant to court order in any work release, work study, community service, or other lawful program, or by reason of any such prisoner failing to return from participation in any such program.
N.C. Gen. Stat. § 14-239