diff --git a/mozilla/layout/base/nsPresContext.cpp b/mozilla/layout/base/nsPresContext.cpp index 0f4cd124d11..73810c0512c 100644 --- a/mozilla/layout/base/nsPresContext.cpp +++ b/mozilla/layout/base/nsPresContext.cpp @@ -224,6 +224,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult) mDeviceContext->GetAppUnitsToDevUnits()); rv = mImageGroup->Init(drawCtx); NS_RELEASE(drawCtx); + NS_RELEASE(window); if (NS_OK != rv) { return rv; } @@ -277,6 +278,7 @@ nsPresContext::LoadImage(const nsString& aURL, if (NS_OK != rv) { return rv; } + NS_RELEASE(group); } // We haven't seen that image before. Create a new loader and diff --git a/mozilla/layout/base/src/nsFrameImageLoader.cpp b/mozilla/layout/base/src/nsFrameImageLoader.cpp index e71401154af..9d1e5ee3f97 100644 --- a/mozilla/layout/base/src/nsFrameImageLoader.cpp +++ b/mozilla/layout/base/src/nsFrameImageLoader.cpp @@ -238,6 +238,7 @@ nsFrameImageLoader::DamageRepairFrame() } gXXXInstalledColorMap = PR_TRUE; } + NS_RELEASE(window); // Determine damaged area and tell view manager to redraw it nsPoint offset; diff --git a/mozilla/layout/base/src/nsPresContext.cpp b/mozilla/layout/base/src/nsPresContext.cpp index 0f4cd124d11..73810c0512c 100644 --- a/mozilla/layout/base/src/nsPresContext.cpp +++ b/mozilla/layout/base/src/nsPresContext.cpp @@ -224,6 +224,7 @@ nsPresContext::GetImageGroup(nsIImageGroup*& aGroupResult) mDeviceContext->GetAppUnitsToDevUnits()); rv = mImageGroup->Init(drawCtx); NS_RELEASE(drawCtx); + NS_RELEASE(window); if (NS_OK != rv) { return rv; } @@ -277,6 +278,7 @@ nsPresContext::LoadImage(const nsString& aURL, if (NS_OK != rv) { return rv; } + NS_RELEASE(group); } // We haven't seen that image before. Create a new loader and