Bug 1000548 - Leaking arenas allocated in mozilla::pkix r=keeler

--HG--
extra : rebase_source : 6b0aaef098a4fa4d5749013a332b6b7602640b36
This commit is contained in:
Camilo Viecco 2014-06-05 16:28:46 -07:00
parent 815a36ef4b
commit 2754803080

View File

@ -34,7 +34,14 @@
namespace mozilla { namespace pkix {
typedef ScopedPtr<PLArenaPool, PL_FreeArenaPool> ScopedPLArenaPool;
inline void
ArenaFalseCleaner(PLArenaPool *arena) {
// PL_FreeArenaPool can't be used because it doesn't actually free the
// memory, which doesn't work well with memory analysis tools
return PORT_FreeArena(arena, PR_FALSE);
}
typedef ScopedPtr<PLArenaPool, ArenaFalseCleaner> ScopedPLArenaPool;
typedef ScopedPtr<CERTCertificate, CERT_DestroyCertificate>
ScopedCERTCertificate;