(a)
A member—
(1)
who is required to take leave under section
876a of this title, any period of which is charged as excess leave under section
706
(a) of this title; and
(2)
whose sentence by court-martial to a dismissal or a dishonorable or bad-conduct discharge is set aside or disapproved by a Court of Criminal Appeals under section
866 of this title or by the United States Court of Appeals for the Armed Forces under section
867 of this title,
shall be paid, as provided in subsection (b), for the period of leave charged as excess leave, unless a rehearing or new trial is ordered and a dismissal or a dishonorable or bad-conduct discharge is included in the result of the rehearing or new trial and such dismissal or discharge is later executed.