mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 13:07:55 +00:00
fix datastore get call in JNI
Just delete the local reference rather than do an array delete. Array delete was causing a crash on loading network config files. Deleting the local ref works fine, though, as it still lets the JVM garbage collecter know that the native code is done with the array
This commit is contained in:
parent
2d67196667
commit
09631ad382
@ -333,10 +333,10 @@ namespace {
|
||||
|
||||
if(retval > 0)
|
||||
{
|
||||
env->GetByteArrayRegion(bufferObj, 0, bufferSize, (jbyte*)buffer);
|
||||
env->GetByteArrayRegion(bufferObj, 0, retval, (jbyte*)buffer);
|
||||
env->GetLongArrayRegion(objectSizeObj, 0, 1, (jlong*)out_objectSize);
|
||||
env->ReleaseByteArrayElements(bufferObj, (jbyte*)buffer, 0);
|
||||
env->ReleaseLongArrayElements(objectSizeObj, (jlong*)out_objectSize, 0);
|
||||
env->DeleteLocalRef(bufferObj);
|
||||
env->DeleteLocalRef(objectSizeObj);
|
||||
}
|
||||
|
||||
LOGI("Out Object Size: %lu", *out_objectSize);
|
||||
|
Loading…
Reference in New Issue
Block a user