Fixed memory leak in nsHttpUrlImpl::SetSpec()

git-svn-id: svn://10.0.0.236/trunk@16923 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1998-12-29 01:32:39 +00:00
parent 62065135d1
commit eb80b6fbaa

View File

@@ -744,6 +744,7 @@ nsresult nsHttpUrlImpl::SetSpec(const char *aNewSpec)
// NS_ASSERTION(m_URL_s == nsnull, "URL has already been opened");
NS_LOCK_INSTANCE();
// rv = ParseURL(aNewSpec);
PR_FREEIF(mSpec);
mSpec = nsCRT::strdup(aNewSpec);
NS_UNLOCK_INSTANCE();
return rv;