Fix mem leak when trying to open a non-existing image file (issue 2126).
authorPrzemysław Sobala <psobala@wp-sa.pl>
Tue, 10 Aug 2010 17:27:22 +0000 (17:27 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Tue, 10 Aug 2010 17:27:22 +0000 (17:27 +0000)
Patch by Przemysław Sobala, psobala wp-sa pl

Originally committed as revision 24757 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index 2f59c26..fb0554b 100644 (file)
@@ -474,6 +474,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
             if (st) {
                 av_free(st->priv_data);
                 av_free(st->codec->extradata);
+                av_free(st->codec);
             }
             av_free(st);
         }