The several cities and towns shall have the right to use the correctional institutions of the state for the confinement of persons committed under the authority of the ordinances of the cities or towns; provided, that the director of corrections shall not be liable for damages or costs in any suit which may be brought by any person or persons who may be committed to the correctional institutions under the authority of this section.
R.I. Gen. Laws § 11-25-11