提交 ae895a40 编写于 作者: M Michael Niedermayer

10l (double free)

Originally committed as revision 3764 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 ed2d7a34
...@@ -155,7 +155,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) ...@@ -155,7 +155,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st = av_new_stream(s1, 0); st = av_new_stream(s1, 0);
if (!st) { if (!st) {
av_free(s);
return -ENOMEM; return -ENOMEM;
} }
...@@ -181,7 +180,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) ...@@ -181,7 +180,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
if (!s->is_pipe) { if (!s->is_pipe) {
if (find_image_range(&first_index, &last_index, s->path) < 0) if (find_image_range(&first_index, &last_index, s->path) < 0)
goto fail; return AVERROR_IO;
s->img_first = first_index; s->img_first = first_index;
s->img_last = last_index; s->img_last = last_index;
s->img_number = first_index; s->img_number = first_index;
...@@ -204,10 +203,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) ...@@ -204,10 +203,6 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
} }
return 0; return 0;
fail:
av_free(s);
return AVERROR_IO;
} }
static int img_read_packet(AVFormatContext *s1, AVPacket *pkt) static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册