Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2019-04-25 18:40:55 +0300
committerMatthieu Bouron <matthieu.bouron@gmail.com>2019-07-26 19:28:20 +0300
commita3d986ff47b15dcfdda3060d1b9ea3ae81a3d7ad (patch)
tree1fe5d03f9179472ea20b470fed67b10f7287c3fa /libavcodec
parent65434823a1eed14733580e75b0f0706731885b90 (diff)
avcodec/mediacodec_wrapper: fix a local reference leak in ff_AMediaCodec_getName()
(cherry picked from commit 9cb8875c165e6377a3eebdce9743c5579f131248)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mediacodec_wrapper.c4
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;
}