Browse code

asfenc: fix leaking asf->index_ptr on error

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2c8cff2be4a044c66e4904efa156dafd0d332d25)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Andreas Cadhalpun authored on 2015/03/10 03:31:39
Showing 1 changed files
... ...
@@ -660,6 +660,7 @@ static int asf_write_header(AVFormatContext *s)
660 660
      * It is needed to use asf as a streamable format. */
661 661
     if (asf_write_header1(s, 0, DATA_HEADER_SIZE) < 0) {
662 662
         //av_free(asf);
663
+        av_freep(&asf->index_ptr);
663 664
         return -1;
664 665
     }
665 666