diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 4bc08f3d30c..9a07d08306e 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -423,6 +423,7 @@ HTMLContentSink::SetTitle(const nsString& aValue) nsresult rv = NS_NewHTMLTitle(&it, atom, aValue); if (NS_OK == rv) { mHead->AppendChild(it, PR_FALSE); + NS_RELEASE(it); } NS_RELEASE(atom); return NS_OK; diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 4bc08f3d30c..9a07d08306e 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -423,6 +423,7 @@ HTMLContentSink::SetTitle(const nsString& aValue) nsresult rv = NS_NewHTMLTitle(&it, atom, aValue); if (NS_OK == rv) { mHead->AppendChild(it, PR_FALSE); + NS_RELEASE(it); } NS_RELEASE(atom); return NS_OK;