summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2017-05-17 11:44:48 +0200
committerDaiki Ueno <dueno@redhat.com>2017-05-17 11:44:48 +0200
commitb40162615bf9734183869b43bd5fc50fe862aad7 (patch)
tree796f8395da83023abf2c7be80b3df8c098702199
parente340db9aeabd6b77c57112596ae60f9bbf22ad8c (diff)
downloadnss-hg-b40162615bf9734183869b43bd5fc50fe862aad7.tar.gz
Bug 1365193, crmftest: fix memleaks spotted by coverity, r=kaie
-rw-r--r--cmd/crmftest/testcrmf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/crmftest/testcrmf.c b/cmd/crmftest/testcrmf.c
index fefa6894d..cbc680b08 100644
--- a/cmd/crmftest/testcrmf.c
+++ b/cmd/crmftest/testcrmf.c
@@ -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");