diff --git a/dom/src/base/nsLocation.cpp b/dom/src/base/nsLocation.cpp index de913107a00..9d5a63448b5 100644 --- a/dom/src/base/nsLocation.cpp +++ b/dom/src/base/nsLocation.cpp @@ -377,7 +377,7 @@ LocationImpl::SetHrefWithBase(const nsString& aHref, nsXPIDLCString referrerCSpec; referrer->GetSpec(getter_Copies(referrerCSpec)); - nsAutoString referrerSpec = referrerCSpec; + nsAutoString referrerSpec(referrerCSpec); // Load new URI. nsCOMPtr webShell(do_QueryInterface(mDocShell));