1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavc/ffjni: fix local reference leak

Reviewed-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
Matthieu Bouron 2017-05-10 15:57:57 +02:00
parent 5d0b8b1ae3
commit 2f43897f65

View File

@ -303,6 +303,11 @@ int ff_jni_init_jfields(JNIEnv *env, void *jfields, const struct FFJniField *jfi
last_clazz = *(jclass*)((uint8_t*)jfields + jfields_mapping[i].offset) =
global ? (*env)->NewGlobalRef(env, clazz) : clazz;
if (global) {
(*env)->DeleteLocalRef(env, clazz);
}
} else {
if (!last_clazz) {