Fix for bug 306809 (oom mlk in txVariable::Convert). r/sr=bz.

git-svn-id: svn://10.0.0.236/trunk@179624 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2005-09-04 15:45:22 +00:00
parent 9f5fba5e1e
commit fef66a57a0

View File

@@ -1105,8 +1105,8 @@ txVariable::Convert(nsIVariant *aValue, txAExprResult** aResult)
for (i = 0; i < length; ++i) {
nodeList->Item(i, getter_AddRefs(node));
txXPathNode *xpathNode =
txXPathNativeNode::createXPathNode(node);
nsAutoPtr<txXPathNode> xpathNode(
txXPathNativeNode::createXPathNode(node));
if (!xpathNode) {
return NS_ERROR_FAILURE;
}
@@ -1188,8 +1188,8 @@ txVariable::Convert(nsIVariant *aValue, txAExprResult** aResult)
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(supports);
NS_ASSERTION(node, "Huh, we checked this in SetParameter?");
txXPathNode *xpathNode =
txXPathNativeNode::createXPathNode(node);
nsAutoPtr<txXPathNode> xpathNode(
txXPathNativeNode::createXPathNode(node));
if (!xpathNode) {
while (i < count) {
NS_RELEASE(values[i++]);