The clerk of the supreme court shall, within five days after the reversal of a judgment sentencing any prisoner to the penitentiary, notify the legal authorities of the penitentiary of the reversal, unless it appear of record that the person so sentenced is not in his keeping.