From be3c6747a88d8bbb2c6b87c9eb97b14a42b90ae7 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Tue, 22 Nov 2011 11:53:44 -0700
Subject: remove redundant memory allocation for sh-2651: [crashhunters] Crash
 after google translate failure

---
 indra/llxml/llxmlnode.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/llxml/llxmlnode.cpp')

diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 9f1e249ddd..4362c88c4e 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -1277,7 +1277,7 @@ bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node,
 	{
 		return mDefault->getAttribute(name, node, FALSE);
 	}
-	node = new LLXMLNode();
+	
 	return false;
 }
 
-- 
cgit v1.2.3


From 2851cd519338ef4a1fde15da8d4015ab4380d6cb Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Mon, 28 Nov 2011 11:33:49 -0700
Subject: a try fix for sh-2651: [crashhunters] Crash after google translate
 failure and sh-2658: crash in LLPluginMessage::parse

---
 indra/llxml/llxmlnode.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra/llxml/llxmlnode.cpp')

diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 4362c88c4e..2b4a0fc2a1 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -693,7 +693,7 @@ bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXML
 	LLFILE* fp = LLFile::fopen(filename, "rb");		/* Flawfinder: ignore */
 	if (fp == NULL)
 	{
-		node = new LLXMLNode();
+		node = NULL ;
 		return false;
 	}
 	fseek(fp, 0, SEEK_END);
@@ -746,7 +746,7 @@ bool LLXMLNode::parseBuffer(
 	{
 		llwarns << "Parse failure - wrong number of top-level nodes xml."
 				<< llendl;
-		node = new LLXMLNode();
+		node = NULL ;
 		return false;
 	}
 
@@ -805,7 +805,7 @@ bool LLXMLNode::parseStream(
 	{
 		llwarns << "Parse failure - wrong number of top-level nodes xml."
 				<< llendl;
-		node = new LLXMLNode();
+		node = NULL;
 		return false;
 	}
 
@@ -1206,7 +1206,7 @@ bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOO
 	{
 		return mDefault->getChild(name, node, FALSE);
 	}
-	node = new LLXMLNode();
+	node = NULL;
 	return false;
 }
 
-- 
cgit v1.2.3