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

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: Make vp3 fix an ignore. 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 | « libavcodec/pthread.c ('k') | libavcodec/vorbisdec.c » ('j') | no next file with comments »
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 9e31d9ede0be0dc8b5636c81d9e0e9af54caccdf..72e25dc93521c8ec1f5f6af1c0f629b1dfe9b0f4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -874,6 +874,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 | « libavcodec/pthread.c ('k') | libavcodec/vorbisdec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698