.clang-format
author David Keeler <dkeeler@mozilla.com>
Mon, 21 Dec 2015 17:14:41 -0800
changeset 312859 f745c6e024a325921801db0394add38c86f34add
parent 281210 b78ed11c5379cf4259a62819625eb3a36f5fe7c2
child 367410 c4917d6cf7764fecda6e2b9a5a1ab3545d3f955f
permissions -rw-r--r--
bug 1234417 - fix a leak in CreateECPublicKey r=rbarnes Before this patch, CreateECPublicKey would create a SECKEYPublicKey allocated on a scoped arena. It would then call CryptoKey::PublicKeyValid, which has the side-effect of importing the key to the internal PKCS#11 slot. When the arena went out of scope, the memory for the key would be released, but the reference to the slot wouldn't, causing a leak. This patch fixes the leak by making the SECKEYPublicKey a ScopedSECKEYPublicKey (which ensures that the type-specific "destructor" SECKEY_DestroyPublicKey is called, which releases the reference to the PKCS#11 slot).

BasedOnStyle: Mozilla

# Ignore all comments because they aren't reflowed properly.
CommentPragmas: "^"