Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Unified Diff: libavcodec/utils.c

Issue 9373002: Fix valgrind and asan memory leaks and crashes. (Closed) Base URL: ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | libavcodec/vorbisdec.c » ('j') | libavcodec/vp3.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libavcodec/utils.c
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 74206720ca607ac0d8317e20d45b04de908ac2e4..b7f2306a0945481de0ff2a72c6d8540d0077cf89 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -886,6 +886,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
if(avctx->codec->init && !(avctx->active_thread_type&FF_THREAD_FRAME)){
ret = avctx->codec->init(avctx);
if (ret < 0) {
+ if(avctx->codec->close)
+ avctx->codec->close(avctx);
goto free_and_end;
}
}
« no previous file with comments | « no previous file | libavcodec/vorbisdec.c » ('j') | libavcodec/vp3.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698