diff --git a/mozilla/security/nss/lib/crmf/servget.c b/mozilla/security/nss/lib/crmf/servget.c index 45b056fa487..85be9e55634 100644 --- a/mozilla/security/nss/lib/crmf/servget.c +++ b/mozilla/security/nss/lib/crmf/servget.c @@ -409,7 +409,7 @@ crmf_copy_poposigningkey(PRArenaPool *poolp, } return SECSuccess; loser: - if (destPopoSignKey && poolp == NULL) { + if (poolp == NULL) { CRMF_DestroyPOPOSigningKey(destPopoSignKey); } return SECFailure; @@ -440,13 +440,10 @@ crmf_copy_popoprivkey(PRArenaPool *poolp, rv = SECFailure; } - if (rv != SECSuccess) { - if (destPrivKey && poolp == NULL) { - CRMF_DestroyPOPOPrivKey(destPrivKey); - } - return SECFailure; + if (rv != SECSuccess && poolp == NULL) { + CRMF_DestroyPOPOPrivKey(destPrivKey); } - return SECSuccess; + return rv; } static CRMFProofOfPossession*