Resolves: Bug 812423 - nss_Init leaks memory, fix from RHEL 6.3

- Fix conributed by Kamil Dudka
This commit is contained in:
Elio Maldonado 2012-04-13 10:10:57 -07:00
parent 41064271a8
commit c38003c691
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,27 @@
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

View File

@ -7,7 +7,7 @@
Summary: Network Security Services
Name: nss
Version: 3.13.4
Release: 2%{?dist}
Release: 3%{?dist}
License: MPLv1.1 or GPLv2+ or LGPLv2+
URL: http://www.mozilla.org/projects/security/pki/nss/
Group: System Environment/Libraries
@ -79,6 +79,8 @@ Patch32: Bug-800674-Unable-to-contact-LDAP-Server-during-winsync.patch
# upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=734492
Patch33: Bug-800682-Qpid-AMQP-daemon-fails-to-load-after-nss-update.patch
# upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=745224
Patch34: Bug-772628-nss_Init-leaks-memory.patch
%description
Network Security Services (NSS) is a set of libraries designed to
@ -161,11 +163,12 @@ low level services.
%patch25 -p0 -b .systemfreebl
%patch26 -p0 -b .nofipstest
# activate only if requested for this branch
%patch29 -p0 -b .770682
#%patch29 -p0 -b .770682
%patch30 -p0 -b .784672
%patch31 -p0 -b .gcc47
%patch32 -p0 -b .800674
%patch33 -p0 -b .800682
%patch34 -p1 -b .772628
%build
@ -580,6 +583,9 @@ rm -rf $RPM_BUILD_ROOT/%{_includedir}/nss3/nsslowhash.h
%changelog
* Fri Apr 13 2012 Elio Maldonado <emaldona@redhat.com> - 3.13.4-3
- Resolves: Bug 812423 - nss_Init leaks memory, fix from RHEL 6.3
* Sun Apr 08 2012 Elio Maldonado <emaldona@redhat.com> - 3.13.4-2
- Resolves: Bug 805723 - Library needs partial RELRO support added
- Patch coreconf/Linux.mk as done on RHEL 6.2