diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-12-19 20:25:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-12-19 20:25:55 +0000 |
commit | ae895a40c55e25d0b62687cda2a871dfa1b1b8b0 (patch) | |
tree | 3e9224fc0da81cfc090e03be6eab1c8e0618bc0e | |
parent | ed2d7a341e125f5d3b4cd63a182815b257080dd1 (diff) | |
download | ffmpeg-ae895a40c55e25d0b62687cda2a871dfa1b1b8b0.tar.gz |
10l (double free)
Originally committed as revision 3764 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/img2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 158bf485a1..f6fa8af44b 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -155,7 +155,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) st = av_new_stream(s1, 0); if (!st) { - av_free(s); return -ENOMEM; } @@ -181,7 +180,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) if (!s->is_pipe) { if (find_image_range(&first_index, &last_index, s->path) < 0) - goto fail; + return AVERROR_IO; s->img_first = first_index; s->img_last = last_index; s->img_number = first_index; @@ -204,10 +203,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) } return 0; - - fail: - av_free(s); - return AVERROR_IO; } static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) |