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

Unified Diff: libavformat/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 | « libavformat/oggparsevorbis.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libavformat/utils.c
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 71baf58d6003358991faa4ba38411039c85a316c..8833a0b477c2902fac38b442478b5cd965b03eac 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -595,8 +595,10 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC);
if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header)
- if ((ret = s->iformat->read_header(s)) < 0)
+ if ((ret = s->iformat->read_header(s)) < 0) {
+ s->iformat->read_close(s);
goto fail;
+ }
if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->data_offset)
s->data_offset = avio_tell(s->pb);
« no previous file with comments | « libavformat/oggparsevorbis.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698