diff --git a/src/jnienv.cpp b/src/jnienv.cpp index 12fd3d9fbc..bcd2c2f05c 100644 --- a/src/jnienv.cpp +++ b/src/jnienv.cpp @@ -219,7 +219,7 @@ ReleaseStringUTFChars(Thread* t, jstring s, const char* chars) { ENTER(t, Thread::ActiveState); - t->m->heap->free(chars, stringLength(t, *s) + 1); + t->m->heap->free(chars, stringUTFLength(t, *s) + 1); } void JNICALL