Skip to content

Commit

Permalink
Bug 1365193, crmftest: fix memleaks spotted by coverity, r=kaie
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed May 17, 2017
1 parent bd79273 commit 4563164
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/crmftest/testcrmf.c
Expand Up @@ -1261,11 +1261,13 @@ DoChallengeResponse(SECKEYPrivateKey *privKey,
return 908;
}
keyID = PK11_MakeIDFromPubKey(publicValue);
SECITEM_FreeItem(publicValue, PR_TRUE);
if (keyID == NULL) {
printf("Could not make the keyID from the public value\n");
return 909;
}
foundPrivKey = PK11_FindKeyByKeyID(privKey->pkcs11Slot, keyID, &pwdata);
SECITEM_FreeItem(keyID, PR_TRUE);
if (foundPrivKey == NULL) {
printf("Could not find the private key corresponding to the public"
" value.\n");
Expand Down

0 comments on commit 4563164

Please sign in to comment.