Commit 9cb8875c authored by Matthieu Bouron's avatar Matthieu Bouron

avcodec/mediacodec_wrapper: fix a local reference leak in ff_AMediaCodec_getName()

parent 6251ad89
...@@ -1337,6 +1337,10 @@ char *ff_AMediaCodec_getName(FFAMediaCodec *codec) ...@@ -1337,6 +1337,10 @@ char *ff_AMediaCodec_getName(FFAMediaCodec *codec)
ret = ff_jni_jstring_to_utf_chars(env, name, codec); ret = ff_jni_jstring_to_utf_chars(env, name, codec);
fail: fail:
if (name) {
(*env)->DeleteLocalRef(env, name);
}
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment