]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: fix double PK11_DestroyContext() if PK11_DigestFinal() failed
authorDunrong Huang <riegamaths@gmail.com>
Wed, 25 Nov 2015 10:24:30 +0000 (18:24 +0800)
committerDunrong Huang <riegamaths@gmail.com>
Sat, 28 Nov 2015 15:48:23 +0000 (23:48 +0800)
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
src/auth/Crypto.cc

index 24c4bd0d5617d3c070962bfd5ddb3868f1995373..5386319d60875e6c44279550963016c501891a29 100644 (file)
@@ -243,7 +243,6 @@ static int nss_aes_operation(CK_ATTRIBUTE_TYPE op,
                         out_tmp.length()-written);
   PK11_DestroyContext(ectx, PR_TRUE);
   if (ret != SECSuccess) {
-    PK11_DestroyContext(ectx, PR_TRUE);
     if (error) {
       ostringstream oss;
       oss << "NSS AES final round failed: " << PR_GetError();