[FFmpeg-cvslog] asfenc: fix leaking asf->index_ptr on error

Andreas Cadhalpun git at videolan.org
Sun Mar 29 03:41:20 CEST 2015


ffmpeg | branch: release/2.4 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Mon Mar  9 19:31:39 2015 +0100| [de2f46c59dade95fe45b7b99fb4c0619943ef3ad] | committer: Michael Niedermayer

asfenc: fix leaking asf->index_ptr on error

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

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de2f46c59dade95fe45b7b99fb4c0619943ef3ad
---

 libavformat/asfenc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index cccbf85..ece840e 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -664,6 +664,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;
     }
 



More information about the ffmpeg-cvslog mailing list