diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 84cbdf523b2827034ac2d9820f723c665a593b0d..69c30794b40ef5b015fe7d62c990140a616b1e8c 100755
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -75,7 +75,6 @@ public:
 		LLBufferStream istr(channels, buffer.get());
 		std::stringstream strstrm;
 		strstrm << istr.rdbuf();
-		const std::string body = strstrm.str();
 
 		if (getStatus() != HTTP_OK)
 		{
@@ -87,7 +86,7 @@ public:
 		Json::Value root;
 		Json::CharReaderBuilder reader;
 		std::string errors;
-		if (!Json::parseFromStream(reader, std::istringstream(body), &root, &errors))
+		if (!Json::parseFromStream(reader, strstrm, &root, &errors))
 		{
 			LL_WARNS() << "Failed to parse upload config: " << errors << LL_ENDL;
 			LLWebProfile::reportImageUploadStatus(false);