diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index f4f64a62e1..5e0f7b05c7 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -660,6 +660,7 @@ static int asf_write_header(AVFormatContext *s) * It is needed to use asf as a streamable format. */ if (asf_write_header1(s, 0, DATA_HEADER_SIZE) < 0) { //av_free(asf); + av_freep(&asf->index_ptr); return -1; }