diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index beacd73459..39ba3d9b92 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -630,6 +630,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; }