Fix a small memory leak.

Found by someone reading the code, rather than because we saw a crash. This is
only a small leak, and you'd have to be dumping threads (because of an ANR) or
creating a new thread to provoke it.

(cherry picked from commit 6d1a1dfd0ef006e19067b6ffd927160d0c6d9647)

Change-Id: Id857efca8d34b20d1acaa452c3fe5d2975e2572b
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index 5122adf..8e879e0 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -3340,7 +3340,10 @@
     StringObject* nameObj = (StringObject*)
         dvmGetFieldObject(thread->threadObj, gDvm.offJavaLangThread_name);
-    return dvmCreateCstrFromString(nameObj);
+    char* name = dvmCreateCstrFromString(nameObj);
+    std::string result(name);
+    free(name);
+    return result;