diff options
author | Matthieu Bouron <matthieu.bouron@gmail.com> | 2019-04-25 17:12:32 +0200 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@gmail.com> | 2019-07-22 08:57:33 +0200 |
commit | 3f232d713db3cb665c265387c7009904c2e85e58 (patch) | |
tree | aabd6404ba4517bf4911c02c06280ed4d633592c /libavcodec/mediacodec_wrapper.c | |
parent | 9cb8875c165e6377a3eebdce9743c5579f131248 (diff) |
avcodec/mediacodec_wrapper: fix a potential local reference leak in ff_AMediaCodec_getCodecNameByType()
Diffstat (limited to 'libavcodec/mediacodec_wrapper.c')
-rw-r--r-- | libavcodec/mediacodec_wrapper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index e2df07cb41..70e1e7cae1 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -469,6 +469,11 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e goto done; } + if (codec_name) { + (*env)->DeleteLocalRef(env, codec_name); + codec_name = NULL; + } + /* Skip software decoders */ if ( strstr(name, "OMX.google") || |