Fix mem leak when user preallocates an AVFormatContext, passes it to
authorArt Clarke <aclarke@vlideshow.com>
Wed, 8 Jul 2009 08:26:57 +0000 (08:26 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Wed, 8 Jul 2009 08:26:57 +0000 (08:26 +0000)
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

index cd18971..3fce3fa 100644 (file)
@@ -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;
 
 }