[Bug 336482] crash or hopefully deadcode [@ crmf_copy_poposigningkey]

because Pointer "destPopoSignKey" dereferenced before NULL check. r=nelson


git-svn-id: svn://10.0.0.236/trunk@196597 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alexei.volkov.bugs%sun.com
2006-05-15 21:05:20 +00:00
parent a5a4d2f9a9
commit 1d9deeee9b

View File

@@ -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*