From 56c6cf287b9f1d25f4c91e00892c5ab3f8436d10 Mon Sep 17 00:00:00 2001 From: Art Clarke Date: Wed, 8 Jul 2009 08:26:57 +0000 Subject: [PATCH] Fix mem leak when user preallocates an AVFormatContext, passes it to av_open_input_file(), but the file does not exist. Patch by Art Clarke a$(surname) xuggle com Originally committed as revision 19370 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index cd189712c0..3fce3fa87b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -499,7 +499,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, av_freep(&pd->buf); if (pb) url_fclose(pb); - *ic_ptr = NULL; + av_freep(ic_ptr); return err; }