nss/Bug-772628-nss_Init-leaks-memory.patch
Elio Maldonado c38003c691 Resolves: Bug 812423 - nss_Init leaks memory, fix from RHEL 6.3
- Fix conributed by Kamil Dudka
2012-04-13 10:10:57 -07:00

28 lines
847 B
Diff

From ea14b3279da63a344dcaf3466592c2619025ac28 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 9 Jan 2012 14:10:07 +0100
Subject: [PATCH] nss - rhbz #772628 (fix a memory leak in nssinit.c) V2
---
mozilla/security/nss/lib/nss/nssinit.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/mozilla/security/nss/lib/nss/nssinit.c b/mozilla/security/nss/lib/nss/nssinit.c
index f1c0327..9fbbab7 100644
--- a/mozilla/security/nss/lib/nss/nssinit.c
+++ b/mozilla/security/nss/lib/nss/nssinit.c
@@ -754,6 +754,10 @@ nss_Init(const char *configdir, const char *certPrefix, const char *keyPrefix,
PZ_NotifyAllCondVar(nssInitCondition);
PZ_Unlock(nssInitLock);
+ if (initContextPtr && configStrings) {
+ PR_smprintf_free(configStrings);
+ }
+
return SECSuccess;
loser:
--
1.7.1