The surety is discharged by any contract between the creditor and the principal debtor, by which the principal debtor is released, or by any act or omission of the creditor, the legal consequence of which is the discharge of the principal debtor. Illustrations (a) A gives a guarantee to C for goods to be supplied by C to B. C supplies goods...