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/904-object-allocation/tracking.cc b/test/904-object-allocation/tracking.cc
index 9261a9f..f993606 100644
--- a/test/904-object-allocation/tracking.cc
+++ b/test/904-object-allocation/tracking.cc
@@ -69,6 +69,7 @@
     char* err;
     jvmti_env->GetErrorName(ret, &err);
     printf("Error setting callbacks: %s\n", err);
+    jvmti_env->Deallocate(reinterpret_cast<unsigned char*>(err));
   }
 }
 
@@ -84,6 +85,7 @@
     char* err;
     jvmti_env->GetErrorName(ret, &err);
     printf("Error enabling/disabling allocation tracking: %s\n", err);
+    jvmti_env->Deallocate(reinterpret_cast<unsigned char*>(err));
   }
 }