bug #19303. HTTPHeader entries were leaking... I checked in a modified version of beards patch.

This commit is contained in:
rpotts%netscape.com 1999-11-22 07:02:44 +00:00
parent 1e859d6869
commit a37eb4c71f

View File

@ -121,7 +121,6 @@ nsresult nsHTTPHeaderArray::SetHeader(nsIAtom* aHeader,
NS_ADDREF(entry);
nsresult rv = mHTTPHeaders->AppendElement(entry) ? NS_OK : NS_ERROR_FAILURE; // XXX this method incorrectly returns a bool
NS_ASSERTION(NS_SUCCEEDED(rv), "AppendElement failed");
NS_RELEASE(entry);
}
//
// Append the new value to the existing string
@ -148,6 +147,8 @@ nsresult nsHTTPHeaderArray::SetHeader(nsIAtom* aHeader,
entry->mValue.SetString(aValue);
}
NS_RELEASE(entry);
return NS_OK;
}