§ 10-9-18 Discharge on failure to showcause for restraint. If no legal cause be shown for the imprisonment or restraint, the court shalldischarge the party therefrom.