If it shall appear that the damages so recovered, and which such surety has been or will be obliged to pay, is not equal to the amount of his liability, the amount thereof shall be allowed him in estimating the extent of his liability in any such action.
§ 522.110, RSMo