From 93da04bdcf91c72bcd51618fe7eb90b8e08dc40d Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Thu, 30 Jul 1998 17:46:33 +0000 Subject: [PATCH] Added some calls to NS_RELEASE() when exiting the function git-svn-id: svn://10.0.0.236/trunk@6878 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/forms/src/nsInputFrame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/html/forms/src/nsInputFrame.cpp b/mozilla/layout/html/forms/src/nsInputFrame.cpp index e9205378adc..75d71a15d7d 100644 --- a/mozilla/layout/html/forms/src/nsInputFrame.cpp +++ b/mozilla/layout/html/forms/src/nsInputFrame.cpp @@ -248,6 +248,7 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext, } nsIPresShell *presShell = aPresContext.GetShell(); // need to release nsIViewManager *viewMan = presShell->GetViewManager(); // need to release + NS_RELEASE(presShell); GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize); @@ -272,6 +273,8 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext, if (NS_OK != result) { NS_ASSERTION(0, "widget initialization failed"); aStatus = NS_FRAME_NOT_COMPLETE; + NS_IF_RELEASE(parView); + NS_IF_RELEASE(viewMan); return NS_OK; } @@ -293,7 +296,6 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext, NS_IF_RELEASE(parView); NS_IF_RELEASE(viewMan); - NS_IF_RELEASE(presShell); } else { GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);