Fixed unsafe use of stringstream.str()

Bug: 29772332

Fixed code making reference to internal data of a temporary object.

Change-Id: I940cce17cd5ada4bb33fa63fde8a63a9038778a8
diff --git a/rsScriptC.cpp b/rsScriptC.cpp
index fb808a6..b4d364f 100644
--- a/rsScriptC.cpp
+++ b/rsScriptC.cpp
@@ -197,7 +197,8 @@
     if (ATRACE_ENABLED()) {
         ss << "runForEach slot[" << slot << "]";
     }
-    ATRACE_NAME(ss.str().c_str());
+    std::string msgStr(ss.str());
+    ATRACE_NAME(msgStr.c_str());
 
     if (mRSC->hadFatalError()) return;