summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexei.volkov.bugs%sun.com <devnull@localhost>2008-04-21 19:36:42 +0000
committeralexei.volkov.bugs%sun.com <devnull@localhost>2008-04-21 19:36:42 +0000
commit4dbe694d49a6f130a8356b984038555b9eb75515 (patch)
treef497830019d4445405b799ac79aed5f6a1aea18e
parentad4f15ab109defc722144054af6c1c755f26897d (diff)
downloadnss-hg-4dbe694d49a6f130a8356b984038555b9eb75515.tar.gz
397832 - libpkix leaks memory if a macro calls a function that returns an error. attachment 316504. r=nelson.
-rwxr-xr-xsecurity/nss/lib/libpkix/pkix/top/pkix_policychecker.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/nss/lib/libpkix/pkix/top/pkix_policychecker.c b/security/nss/lib/libpkix/pkix/top/pkix_policychecker.c
index 633125c79..162f4763d 100755
--- a/security/nss/lib/libpkix/pkix/top/pkix_policychecker.c
+++ b/security/nss/lib/libpkix/pkix/top/pkix_policychecker.c
@@ -895,11 +895,11 @@ pkix_PolicyChecker_MakeMutableCopy(
}
*pMutableCopy = newList;
-
+ newList = NULL;
+
cleanup:
- if (PKIX_ERROR_RECEIVED) {
- PKIX_DECREF(newList);
- }
+ PKIX_DECREF(newList);
+ PKIX_DECREF(object);
PKIX_RETURN(CERTCHAINCHECKER);
}