diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp
index 4653ce7c85c..864d6c762fd 100644
--- a/mozilla/content/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp
@@ -2645,9 +2645,6 @@ NS_IMETHODIMP nsHTMLDocument::FindNext(const nsString &aSearchStr, PRBool aMatch
contentStr.Cut(offset, mSearchStr->Length());
contentStr.Insert(replacementStr, offset, replacementStr.Length());
- char * s = contentStr.ToNewCString();
- delete[]s;
-
nsIDOMNode * parent;
node->GetParentNode(&parent);
diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp
index 4653ce7c85c..864d6c762fd 100644
--- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp
@@ -2645,9 +2645,6 @@ NS_IMETHODIMP nsHTMLDocument::FindNext(const nsString &aSearchStr, PRBool aMatch
contentStr.Cut(offset, mSearchStr->Length());
contentStr.Insert(replacementStr, offset, replacementStr.Length());
- char * s = contentStr.ToNewCString();
- delete[]s;
-
nsIDOMNode * parent;
node->GetParentNode(&parent);