Make GetErrorName allocate the output buffer.

Previously we were simply returning a static pointer which isn't
allowed by the spec.

Test: mma -j40 test-art-host
Change-Id: I84cfb81e58d479c7c0d5ee352f5b005183895c82
diff --git a/test/906-iterate-heap/iterate_heap.cc b/test/906-iterate-heap/iterate_heap.cc
index 8dac89d..a2fd591 100644
--- a/test/906-iterate-heap/iterate_heap.cc
+++ b/test/906-iterate-heap/iterate_heap.cc
@@ -61,6 +61,7 @@
     char* err;
     jvmti_env->GetErrorName(ret, &err);
     printf("Failure running IterateThroughHeap: %s\n", err);
+    jvmti_env->Deallocate(reinterpret_cast<unsigned char*>(err));
     return false;
   }
   return true;