gecko-dev/dom/crypto
David Keeler f386d7b91c 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).

--HG--
extra : rebase_source : 10ef3c0e6ade78ab8ec4c95464224ba2e38aa17b
2015-12-21 17:14:41 -08:00
..
test Bug 1214597 - Ensure that we check the actual result of calling crypto.subtle.verify() in tests r=mt 2015-10-14 13:40:14 +02:00
CryptoBuffer.cpp Bug 968520 - Use FallibleTArray::Clear instead of SetLength(0). r=froydnj 2015-05-28 11:07:43 -07:00
CryptoBuffer.h Bug 1176214 - Part 11: Changes to DOM, except for WebGL. r=bz, r=clb 2015-11-25 19:04:50 +01:00
CryptoKey.cpp bug 1234417 - fix a leak in CreateECPublicKey r=rbarnes 2015-12-21 17:14:41 -08:00
CryptoKey.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
KeyAlgorithmProxy.cpp Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
KeyAlgorithmProxy.h Bug 1169890 - Check return values for CryptoBuffer.Assign() calls r=rbarnes 2015-05-30 08:28:45 +02:00
moz.build Bug 1001691 - Implement WebCrypto thread pool r=bz 2015-09-11 16:01:20 +02:00
WebCryptoCommon.h Bug 1172785 - RTCCertificate implementation, r=rbarnes 2015-07-06 10:40:04 -07:00
WebCryptoTask.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
WebCryptoTask.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
WebCryptoThreadPool.cpp Bug 1001691 - Implement WebCrypto thread pool r=bz 2015-09-11 16:01:20 +02:00
WebCryptoThreadPool.h Bug 1001691 - Implement WebCrypto thread pool r=bz 2015-09-11 16:01:20 +02:00