Don't leak memory in the arena pool

git-svn-id: svn://10.0.0.236/trunk@113126 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
relyea%netscape.com 2002-01-29 19:00:47 +00:00
parent 316733af9e
commit 8fc3bf1fcb

View File

@ -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);