If such judgment be affirmed, the money so deposited shall be paid to the judgment creditor, but if such judgment be reversed, the debtor may withdraw such deposit.