If the court or judge finds the bail sufficient, he shall annex the examination to the undertaking, endorse his allowance thereon, and cause them to be filed with the clerk. The sheriff is then exonerated from liability. (C.C.P., s. 166; Code, s. 308; Rev., s. 743; C.S., s. 783; 1971, c. 268, s. 28.)