No sheriff or other person shall be liable to any civil action for obeying any order of discharge, made according to the provisions of this chapter; and if any action shall be brought against him for suffering any person committed to his custody to go at large, pursuant to any such order, he may plead the same in his answer thereto, in bar of such action.
§ 532.540, RSMo