android: Fix leak of JNI local ref in IMC when creating string array
Fixes: 036fa7a166 ("android: Overload for getMeasurement() that takes a String array as argument")
This commit is contained in:
@@ -192,6 +192,7 @@ static jobjectArray string_array_create(JNIEnv *env, enumerator_t *enumerator)
|
||||
goto failed;
|
||||
}
|
||||
(*env)->SetObjectArrayElement(env, jarray, i++, jstring);
|
||||
(*env)->DeleteLocalRef(env, jstring);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
list->destroy(list);
|
||||
|
||||
Reference in New Issue
Block a user