summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-03-15 22:09:45 +0000
committerwtc%netscape.com <devnull@localhost>2002-03-15 22:09:45 +0000
commitb486edadc1633cb971b06aaaece4ab55885c66f5 (patch)
tree636a709ac7b360a102b3d0688a52e6669023b202
parent43036d4ad79ba9145baf3c479033be51656af98b (diff)
downloadnss-hg-b486edadc1633cb971b06aaaece4ab55885c66f5.tar.gz
Fixed a memory leak on memory allocation error. r=mcgreer. (bug 129709)
-rw-r--r--security/nss/lib/base/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/nss/lib/base/list.c b/security/nss/lib/base/list.c
index ae7375a91..f4ef49b70 100644
--- a/security/nss/lib/base/list.c
+++ b/security/nss/lib/base/list.c
@@ -127,6 +127,9 @@ nssList_Create
}
list = nss_ZNEW(arena, nssList);
if (!list) {
+ if (!arenaOpt) {
+ NSSArena_Destroy(arena);
+ }
return (nssList *)NULL;
}
if (threadSafe) {