From 8fc3bf1fcbc23c23d417ade01157bc45cf808fbe Mon Sep 17 00:00:00 2001 From: "relyea%netscape.com" Date: Tue, 29 Jan 2002 19:00:47 +0000 Subject: [PATCH] Don't leak memory in the arena pool git-svn-id: svn://10.0.0.236/trunk@113126 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/util/secport.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/security/nss/lib/util/secport.c b/mozilla/security/nss/lib/util/secport.c index 90675367a3e..14d32a57b6d 100644 --- a/mozilla/security/nss/lib/util/secport.c +++ b/mozilla/security/nss/lib/util/secport.c @@ -38,7 +38,7 @@ * * NOTE - These are not public interfaces * - * $Id: secport.c,v 1.8 2001-04-06 17:47:15 nelsonb%netscape.com Exp $ + * $Id: secport.c,v 1.9 2002-01-29 19:00:47 relyea%netscape.com Exp $ */ #include "seccomon.h" @@ -281,9 +281,11 @@ PORT_FreeArena(PLArenaPool *arena, PRBool zero) doFreeArenaPool = PR_TRUE; } } - if (doFreeArenaPool) + if (doFreeArenaPool) { PL_FreeArenaPool(arena); - PL_FinishArenaPool(arena); + } else { + PL_FinishArenaPool(arena); + } PORT_ZFree(arena, len); if (lock) { PZ_Unlock(lock);