From e825209039f3789b85568164c5d48d49d6d9b01e Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Thu, 26 Sep 2024 21:22:17 +0200 Subject: [PATCH] [NSS] Bug 1899402 - Correctly destroy bulkkey in error scenario. r=jschanck Differential Revision: https://phabricator.services.mozilla.com/D223837 --HG-- extra : rebase_source : d06a6bb8d51bb844c814c5ee682a1b24de3e2e69 --- security/nss/lib/pkcs7/p7decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/security/nss/lib/pkcs7/p7decode.c b/security/nss/lib/pkcs7/p7decode.c index 641d201e5a..a6a98960f9 100644 --- a/security/nss/lib/pkcs7/p7decode.c +++ b/security/nss/lib/pkcs7/p7decode.c @@ -542,6 +542,7 @@ sec_pkcs7_decoder_start_decrypt(SEC_PKCS7DecoderContext *p7dcx, int depth, * We are done with (this) bulkkey now. */ PK11_FreeSymKey(bulkkey); + bulkkey = NULL; if (decryptobj == NULL) { p7dcx->error = PORT_GetError();