diff options
author | Matthieu Bouron <matthieu.bouron@gmail.com> | 2019-04-25 17:40:55 +0200 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@gmail.com> | 2019-07-22 08:57:33 +0200 |
commit | 9cb8875c165e6377a3eebdce9743c5579f131248 (patch) | |
tree | 7e9ac3b70e619aec215e24707728d33667585b84 /libavcodec/mediacodec_wrapper.c | |
parent | 6251ad89a77566254b934fbf95159d66e29328a8 (diff) | |
download | ffmpeg-9cb8875c165e6377a3eebdce9743c5579f131248.tar.gz |
avcodec/mediacodec_wrapper: fix a local reference leak in ff_AMediaCodec_getName()
Diffstat (limited to 'libavcodec/mediacodec_wrapper.c')
-rw-r--r-- | libavcodec/mediacodec_wrapper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index a024e3bdb1..e2df07cb41 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -1337,6 +1337,10 @@ char *ff_AMediaCodec_getName(FFAMediaCodec *codec) ret = ff_jni_jstring_to_utf_chars(env, name, codec); fail: + if (name) { + (*env)->DeleteLocalRef(env, name); + } + return ret; } |