From: Dunrong Huang Date: Wed, 25 Nov 2015 10:24:30 +0000 (+0800) Subject: auth: fix double PK11_DestroyContext() if PK11_DigestFinal() failed X-Git-Tag: v0.94.7~3^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af5da4f24d7c2ea5a1322450180099278dd0da7c;p=ceph.git auth: fix double PK11_DestroyContext() if PK11_DigestFinal() failed Signed-off-by: Dunrong Huang (cherry picked from commit e9e05333ac7c64758bf14d80f6179e001c0fdbfd) Signed-off-by: Brad Hubbard --- diff --git a/src/auth/Crypto.cc b/src/auth/Crypto.cc index 5223f5a48e88..4f6367dc2c6d 100644 --- a/src/auth/Crypto.cc +++ b/src/auth/Crypto.cc @@ -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();