From 962a468486ffaef2ff2d6c4897547532aaf9f429 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Tue, 11 Aug 1998 04:06:28 +0000 Subject: [PATCH] Fixed a memory leak. In some error cases we weren't calling NR_RegClose() git-svn-id: svn://10.0.0.236/trunk@7730 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/components/nsRepository.cpp | 2 +- mozilla/xpcom/src/nsRepository.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/xpcom/components/nsRepository.cpp b/mozilla/xpcom/components/nsRepository.cpp index 44c81f2dcb8..78dbc1630ab 100644 --- a/mozilla/xpcom/components/nsRepository.cpp +++ b/mozilla/xpcom/components/nsRepository.cpp @@ -155,9 +155,9 @@ static FactoryEntry *platformFind(const nsCID &aCID) delete [] cidString; if (err == REGERR_OK) { res = new FactoryEntry(aCID, NULL, library); - NR_RegClose(hreg); } } + NR_RegClose(hreg); } return res; } diff --git a/mozilla/xpcom/src/nsRepository.cpp b/mozilla/xpcom/src/nsRepository.cpp index 44c81f2dcb8..78dbc1630ab 100644 --- a/mozilla/xpcom/src/nsRepository.cpp +++ b/mozilla/xpcom/src/nsRepository.cpp @@ -155,9 +155,9 @@ static FactoryEntry *platformFind(const nsCID &aCID) delete [] cidString; if (err == REGERR_OK) { res = new FactoryEntry(aCID, NULL, library); - NR_RegClose(hreg); } } + NR_RegClose(hreg); } return res; }