From bdd1ad3abf883a51753f47252d6e3b46ea126e08 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 11 Nov 1998 16:50:51 +0000 Subject: [PATCH] Fixed memory leak --- content/html/style/src/nsCSSStyleSheet.cpp | 2 +- layout/html/style/src/nsCSSStyleSheet.cpp | 2 +- layout/style/nsCSSStyleSheet.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/html/style/src/nsCSSStyleSheet.cpp b/content/html/style/src/nsCSSStyleSheet.cpp index ed26e26bb05..b593d52e97a 100644 --- a/content/html/style/src/nsCSSStyleSheet.cpp +++ b/content/html/style/src/nsCSSStyleSheet.cpp @@ -1005,7 +1005,7 @@ static void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData) content->GetParent(content); NS_IF_RELEASE(lastContent); } - NS_IF_RELEASE(lastContent); + NS_IF_RELEASE(content); if (nsnull == selector) { // ran out, it matched nsIStyleRule* iRule; if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) { diff --git a/layout/html/style/src/nsCSSStyleSheet.cpp b/layout/html/style/src/nsCSSStyleSheet.cpp index ed26e26bb05..b593d52e97a 100644 --- a/layout/html/style/src/nsCSSStyleSheet.cpp +++ b/layout/html/style/src/nsCSSStyleSheet.cpp @@ -1005,7 +1005,7 @@ static void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData) content->GetParent(content); NS_IF_RELEASE(lastContent); } - NS_IF_RELEASE(lastContent); + NS_IF_RELEASE(content); if (nsnull == selector) { // ran out, it matched nsIStyleRule* iRule; if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) { diff --git a/layout/style/nsCSSStyleSheet.cpp b/layout/style/nsCSSStyleSheet.cpp index ed26e26bb05..b593d52e97a 100644 --- a/layout/style/nsCSSStyleSheet.cpp +++ b/layout/style/nsCSSStyleSheet.cpp @@ -1005,7 +1005,7 @@ static void PseudoEnumFunc(nsICSSStyleRule* aRule, void* aData) content->GetParent(content); NS_IF_RELEASE(lastContent); } - NS_IF_RELEASE(lastContent); + NS_IF_RELEASE(content); if (nsnull == selector) { // ran out, it matched nsIStyleRule* iRule; if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) {